Example: content reference and the @xml:lang
attribute
This section is non-normative.
This example outlines how processors
determine the effective value of the @xml:lang
attribute for content that is referenced by the @conref
or @conkeyref
attribute.
In this scenario, a company has a notices topic
that contains warnings in multiple languages. The notices topic
specifies an @xml:lang
attribute of
en. However, it contains content that is reused
from topics that explicitly set the @xml:lang
attribute to fr and
de.
The following code block shows the content of the DITA topic that contains the referencing elements:
The following code blocks show the content of the topics that contains the referenced elements:
When the topic that contains the conrefed notes is processed, the following occurs:
- The
<note>
element with the@id
attribute set to warning-french has an effective value for the@xml:lang
attribute of fr. - The
<note>
element with the@id
attribute set to warning-german has an effective value for the@xml:lang
attribute of de.
In each case, the effective value of the @xml:lang
attribute for the note is determined by the value of the
@xml:lang
attribute that is specified on the
topic that contains the referenced element, instead of the value of
the @xml:lang
attribute that is specified on the
notices topic that contains the referencing elements.