[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Using a variable for node name matching

Subject: Re: Using a variable for node name matching
From: Steve Tinney <stinney@xxxxxxxxxxxxx>
Date: Wed, 09 Feb 2000 23:28:40 -0500
node name variable
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.