Problem with saxon and DOMSource
The Saxon XSLT and XQuery processor, developed by Saxonica
Brought to you by:
mhkay
Hallo,
I have a DOM tree and i want to make a XSLT-transformation on this tree. Depending on where I am in the tree, I use a specific XSLT file for the transformation.
I have a function that performs the transformation. She gets as parameters the node (DOM subtree) and the path of the XSLT file
When I do somehting like that:
<xsl:variable name="numberOfCol">
<xsl:value-of select="//col"/>
</xsl:variable>
The returned numberOfCol is not right. I get the number of all col in the entire tree. But what I want, is the number of col in the subtree
What am I doing wrong ?
Thank you for your help.
PS: Sorry for my bad english
Anonymous
When you are evaluating global variables in the stylesheet, the context item (.) is the node you specified as the initial context node, but "/" is the root of the tree containing the initial context node, which is the DOM Document node. If you want to select descendants of this node, use ".//col" rather than "//col".