Page 1 of 1

Cascade xml.lang attribute in DITA Maps Manager

Posted: Fri Sep 19, 2025 2:02 pm
by Frank Ralf
Hello,

According to the DITA spec there is no cascading from map to topics:
The @xml:lang attribute can be specified on the <map> element. The @xml:lang attribute cascades within the map in the same way that it cascades within a topic. However, since the @xml:lang attribute is an inherent property of the XML document, the value of the @xml:lang attribute does not cascade from one map to another or from a map to a topic; the value of the @xml:lang attribute that is specified in a map does not override @xml:lang values that are specified in other maps or in topics.
Source: www.oxygenxml.com/dita/1.3/specs/archSpec/base/xmllang.html

However, as far as I can tell, the xml:lang attribute does cascade when transforming a DITA map with the DITA Open Toolkit. It would be nice if this would be reflected in Author mode as well. Example: Displaying German task labels if the document language is set to German on the top map <map xml:lang="de-DE">.

Best regards,
Frank

Re: Cascade xml.lang attribute in DITA Maps Manager

Posted: Mon Sep 22, 2025 7:56 am
by Radu
Hi Frank,
As you said, according to the DITA specs, the xml:lang does not cascade from map to topics.
In the DITA to PDF publishing (and not in the DITA to HTML or other formats publishing) as the end result is a single large merged XML document which gets converted to XSL-FO, automatically the xml:lang cascades because of the nature of that single XML document. But is just an implementation dependent behavior so we do not have plans to present in the editor the static texts with the language the topic might inherit at map level. Correct to the specification would be for each topic to define the xml:lang.
Regards,
Radu

Re: Cascade xml.lang attribute in DITA Maps Manager

Posted: Mon Sep 22, 2025 11:21 am
by Frank Ralf
Hi Radu,
Thanks for your quick response. You are right in following the standard.
Best regards,
Frank