attribute lang


lang (as an attribute name)

denotes an attribute whose value is a language code for the natural language of the content of any element; its value is inherited. This name is reserved by virtue of its definition in the XML specification.


Attempting to install the relevant ISO 2- and 3-letter codes as the enumerated possible values is probably never going to be a realistic possibility.

See BCP 47 at and the IANA language subtag registry at for further information.

The union allows for the 'un-declaration' of xml:lang with the empty string.

This component is not nillable.

Local Usage

<xs:attribute name="lang">
<xs:union memberTypes="xs:language">
<xs:restriction base="xs:string">
<xs:enumeration value=""/>

Submit a bug or a feature.
Created by xsddoc, a sub project of xframe, hosted at