chapter/ @xml:lang xpath question

Skip to first unread message


May 17, 2021, 8:21:08 AMMay 17
to DITA-OT Users

I am working with DITA OT 3.1.3 and am encountering the following issue.

When I try to obtain the value of the chapter/@xml:lang in a bookmap, for example 

<chapter href="LanguageDe.ditamap" format="ditamap" type="map" xml:lang="de-DE"/>

by using this xpath in this code

<fo:block >
  <xsl:for-each select="//*[contains(@class, ' bookmap/chapter ')]/@xml:lang">
  <fo:inline xsl:use-attribute-sets="__language__identifier" >
  <xsl:value-of select="."/>

the @xml:lang value does not get picked up. I am not sure where the issue lies in the xpath expression because interestingly, when I tested for the @xml:lang on the bookmap element

<xsl:for-each select="/*[contains(@class, ' bookmap/bookmap ')]/@xml:lang">

the @xml:lang value is picked up. I am not sure if this is a DOT313 issue or an xpath issue. Any help would be welcome.

Thank you.


Radu Coravu

May 17, 2021, 8:52:14 AMMay 17
to U M, DITA-OT Users
Hi Ute, 

Your XPath "//*[contains(@class, ' bookmap/chapter ')]/@xml:lang" seems to match the xml:lang attribute from something like:

    <chapter href="..." xml:lang="..."/>

Maybe you can set the "clean.temp" publishing parameter to "no", publish and then look in the transformation temporary folder at the "_merged.xml" file to see exactly over what XML structure you run the XPath.


For more information on how and why we collect your personal information, please visit our Privacy Policy.

You received this message because you are subscribed to the Google Groups "DITA-OT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web, visit
Reply all
Reply to author
0 new messages