Subject: Re: Using a variable for node name matching From: Steve Tinney <stinney@xxxxxxxxxxxxx> Date: Wed, 09 Feb 2000 23:28:40 -0500 |
> In the stylesheet below, can "$startnode" be used for node matching, > instead of having to type in the whole string ( TEST/TEST1/TEST2 ) > everytime ? > > <xsl:variable name="startnode"> > <xsl:text>TEST/TEST1/TEST2</xsl:text> > </xsl:variable> Not really. You can go some way towards this by storing a node-set in a variable and using that as the initial element of a path, but it doesn't quite have the effect you are looking for. So, you could say: <xsl:variable name="startnode" select="test/test1/test2"/> <xsl:for-each select="$startnode/some/other/nodes"> ... </xsl:for-each> but the variable mechanism is not as flexible as what you are asking about. I wish it were. Steve XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Using a variable for node name matc, Pady Srinivasan | Thread | Global variables and changing withi, Pady Srinivasan |
Re: Global variables and changing w, Steve Tinney | Date | Re: feature request; id idref pair, Steve Tinney |
Month |