|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] how to store node in variable?
Sorry to trouble the list with this one which seems so simple and yet
somehow I am banging my head against the wall for hours and I can't even
think what to search for. The worst part is I think I've done this
before...
How do I store a reference to a node in a variable or what am I doing wrong? Here is what I have (maybe oversimplified) : <xsl:variable name="me"> <xsl:choose> <xsl:when test="<some condition>"> <xsl:copy-of select=".." /> </xsl:when> <xsl:otherwise> <xsl:copy-of select="." /> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="<some template>"> <xsl:with-param name="myid" select="$me/@id" /> </xsl:call-template> The with-param is always throwing an error, expression should result in a node-set. If I add msxsl:node-set around my selects in the variable definition I get cannot convert result tree fragment to node-set. Alternatively, is there any way to explicitly set the context node without using for-each? Again my apologies. -John
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








