Name
xs:language — RFC 1766 language codes.
Derived from:
xs:token
Primary:
xs:string
Known subtypes:
none
Facets:
xs:enumeration, xs:length, xs:maxLength, xs:minLength, xs:pattern, xs:whiteSpace
<xs:simpleType name="language" id="language"> <xs:restriction base="xs:token"> <xs:pattern value="([a-zA-Z]{2}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*" /> </xs:restriction> </xs:simpleType>
Description
The lexical and value spaces of xs:language
are
the set of language codes defined by the RFC 1766.
Restrictions
Although the schema for schema defines a minimal test to perform expressed as patterns (see the Definition), the lexical space is the set of existing language codes.
Example
Some valid values for this datatype are: "en"
,
"en-US"
, "fr"
, or
"fr-FR"
.
Get XML Schema now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.