chapter/ @xml:lang xpath question

17 visningar
Hoppa till det första olästa meddelandet

U M

oläst,
17 maj 2021 08:21:082021-05-17
till 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

oläst,
17 maj 2021 08:52:142021-05-17
till 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.
Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden