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

RE: Selecting from a node-set using variable path

Subject: RE: Selecting from a node-set using variable path
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Wed, 19 Feb 2003 07:06:14 -0700
apply templates using variable
> 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.)


| 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

Current Thread


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.
First Name
Last Name
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.