Subject: Re: [xsl] Selecting from a node-set using variable path|
From: S Woodside <sbwoodside@xxxxxxxxx>
Date: Tue, 18 Feb 2003 20:53:49 -0500
<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>
For the life of me, I don't know how to do this even though it seems like it would be very easy.
I have a variable, myNodeSet, which points to a node set, in this case a set of 1 document element node. I have another variable, myPath, which reflects a (relative) location path to nodes I want to select from myNodeSet.
This works: <xsl:variable name="t1" select="$myNodeSet//a/b/c"/>
This doesn't: <xsl:variable name="t2" select="$myNodeSet/$myPath"/>
I'm using MSXML 4.0 and it's complaining with: NodeTest expected here. $myNodeSet/-->$<--myPath which makes sense.
How do I filter down my node-set based upon some variable location path?
Thanks -- Gary F.