Can you access dita map keydef variables from XSL in Dita-ot plugin

255 Views Asked by At

I know in dita that one can access a keydef

<map>
    <title>variables</title>
    <keydef keys="keyName"><topicmeta><keywords><keyword>Text API</keyword></keywords></topicmeta></keydef>
</map

with a keyref statement

<keyword keyref="keyName"/>

Is it possible to access keydef from an xsl file within a dita-ot pipeline

I tried the following

  <xsl:value-of select="//keydef[@keys eq 'keyName']/topicmeta/keywords/keyword/text()"/>

and

  <xsl:value-of select="keyword[@keyref eq 'copyright']"/>

However these do not work.

Regards Conteh

1

There are 1 best solutions below

2
On BEST ANSWER

I used following :

<xsl:value-of select="$map/*[contains(@class,' mapgroup-d/keydef ') and lower-case(@keys) = ''keyName'']/topicmeta/keywords/keyword/node()"/>

where the $map is defined as

<xsl:variable name="map" select="//opentopic:map"/>