chapter/ @xml:lang xpath question

8 views
Skip to first unread message

U M

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

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="."/>
  </fo:inline>
  </xsl:for-each>
</fo:block>

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

unread,
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.

Regards,
Radu

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 dita-ot-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/dita-ot-users/86e822d9-4539-4686-ad38-6cfaec757172n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages