The @xml:lang attribute

The @xml:lang attribute specifies the language and optional locale of the content that is contained in an element. The @xml:lang attribute is described in the XML Recommendation.

Since the @xml:lang attribute is an inherent property of the XML document, it does not behave in the same way as other DITA metadata attributes do.

Within topic and map documents, the @xml:lang attribute applies to the content and attributes that are contained by the element on which it is specified. This means that it supplies a value for lower-level elements in the containment hierarchy that do not supply their own value for the @xml:lang attribute. However, any such value is overridden when an @xml:lang attribute with a different value is specified on lower-level elements in the containment hierarchy.

When the @xml:lang attribute is specified on a topic reference, it does not apply to the referenced resource. This means that the value of the @xml:lang attribute on a topic reference (or the root element of the map) does not automatically supply a default value for the referenced topic or DITA map.

For topic and map documents, if no value for the @xml:lang value is specified explicitly or on a higher-level element in the containment hierarchy, a processor-determined default value is assumed.