Subject: RE: [xsl] combining two variables to generate XPATH From: "bix xslt" <bix_xslt@xxxxxxxxxxx> Date: Tue, 17 Dec 2002 20:08:20 +0000 |
<xsl:template match="proc"> <xsl:call-template name="foo"> <xsl:with-param name="node" select="." /> </xsl:call-template> </xsl:template>
<xsl:template name="foo"> <xsl:param name="node"/> <xsl:for-each select="$node/branch/leaf"> <xsl:value-of select="@id" /> </xsl:for-each> </xsl:template>
<xsl:template name="foo"> <xsl:param name="node"/> <xsl:param name="branch" select="'someBranch'"/> <xsl:for-each select="$node/$branch/leaf"> <xsl:value-of select="@id" /> </xsl:for-each> </xsl:template>
From: Mark Wilgus <mwilgus@xxxxxxxxx>
I believe this is not possible. XSLT doesn't allow you to use a variable for an XPath expression. See number 2 at the following list:
http://www.dpawson.co.uk/xsl/sect2/nono.html
> -----Original Message----- > From: bix xslt [mailto:bix_xslt@xxxxxxxxxxx]
> > <xsl:variable name="branch" > >select="concat($node,'/',$type,'/item')" /> > > <xsl:value-of select="$branch" /> > ><!-- <xsl:for-each select="$branch"> >
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] combining two variables t, Mark Wilgus | Thread | RE: [xsl] combining two variables t, Wendell Piez |
Re: [xsl] Fibonacci & XSL, Mike Brown | Date | Re: [xsl] combining two variables t, Jeff Kenton |
Month |