RE: Selecting from a node-set using variable path
> From: S Woodside [mailto:sbwoodside@xxxxxxxxx] > Sent: Tuesday, February 18, 2003 6:54 PM > Subject: Re: Selecting from a node-set using variable path > > > If $mypath is a string, you'll need to use dyn:evaluate from EXSLT or > whatever equivalent you can find for your interpreter. > > if $mypath is a nodeset defined by an XPath, e.g. > > <xsl:variable name="myPath" select="a/b/c"/> > then I think you might be able to do something like this: > > <xsl:template match="$myNodeSet> > <xsl:apply-templates select="$myPath"/> > </xsl:template> You can't use a VariableReference in a match pattern in xsl:template. You could, however, define myNodeSet and use it in a select expression: <xsl:apply-templates select="$myNodeSet"/> then you would need a set of templates matching the possible values of $myNodeSet, then apply templates again using $myPath as you have here. ($myPath would either have to be defined globally or passed as a param.) cheers, b. | brian martinez brian.martinez@xxxxxxxx | | senior gui programmer 303.708.7248 | | trip network, inc. fax 303.790.9350 | | 6436 s. racine cir. englewood, co 80111 | | http://www.cheaptickets.com/ http://www.trip.com/ | XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
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