[oXygen-user] Help with XPath -- SOLVED
Mary Anthony
Fri Dec 5 15:06:54 CST 2014
OK, I was able to solve this. My problem being that I forgot the
varialbe_keywords.ditamap was not always *being processed* --- so it was an
external file located in the temp output dir during processing. So, the
solution is, set a path to the file:
<!-- get the location of variable_keywords.ditamap -->
<xsl:param name="PATH2PROJ">
<xsl:apply-templates
select="/processing-instruction('path2project-uri')[1]"
mode="get-path2project"/>
</xsl:param>
<xsl:param name="WORKDIR">
<xsl:apply-templates select="/processing-instruction('workdir-uri')[1]"
mode="get-work-dir"/>
</xsl:param>
<xsl:variable name="VAR-FILE"
select="concat($WORKDIR,$PATH2PROJ,'variable_keywords.ditamap')"/>
Then use the doc() function to point to this external file:
<xsl:comment>
<xsl:value-of
select="doc($VAR-FILE)/map/keydef[@keys='var_release_version']/topicmeta/keywords/keyword"/>
</xsl:comment>
If anyone knows a more elegant solution, feel free to post it back.
Mary
On Fri, Dec 5, 2014 at 8:12 AM, Mary Anthony <> wrote:
> Hi,
>
> I am adding a comment to each file that contains a release number. The
> release number is one of many variables defined in a
> *variable_keywords.ditamap* file. This file is a child of my main
> *ditamap*.
>
> Using the XPath Builder, I tested and found this path located the node I
> needed. (Below is a pic showing the path succeeding.) When I encode this
> path in the dita2webhelp.xsl file, the transformation succeeds but the
> node's RELEASE_VERSION content is not output:
>
> <xsl:comment>
> <xsl:value-of
> select="/map/keydef[@keys='var_release_version']/topicmeta/keywords/keyword"/>
>
> </xsl:comment>
>
> What am I doing wrong?
>
>
>
>
> PICTURE SHOWING THE PATH
> [image: Inline image 1]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20141205/d350f995/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 232735 bytes
Desc: not available
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20141205/d350f995/attachment-0001.png>
More information about the oXygen-user
mailing list