
Dear Mary, Yes, when you execute the XPath in oXygen the default scope is the current file and you have the correct map as the current file, while when that is executed from your XSLT stylesheet, the current file will not be that map anymore. As you already found, you need to use the document function to access that map file content. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 05/12/14 23:06, Mary Anthony wrote:
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 <mary@platfora.com <mailto:mary@platfora.com>> 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 Inline image 1
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user