|
Subject: Re: [xsl] XSLT2, select nodes inside a tokenize()'d variable From: Florent Georges <darkman_spam@xxxxxxxx> Date: Wed, 20 Dec 2006 15:06:10 +0100 (CET) |
James Cummings wrote:
Hi
> <xsl:for-each select="$ana">
> <xsl:value-of select="."/><xsl:text>:</xsl:text>
> <xsl:value-of select="//category[@id = .]/catDesc"/>
> </xsl:for-each>
> However, I'm rightly told that I cannot select a node here
> because the context is an atomic value.
You have to save the document node you want to use into a variable:
<xsl:variable name="root" select="/"/>
<xsl:for-each select="$ana">
<xsl:value-of select="."/>
<xsl:text>:</xsl:text>
<xsl:value-of select="$root//category[@id = .]/catDesc"/>
</xsl:for-each>
BTW, such kind of XPath expression is in general good candidate for
XSLT keys.
Regards,
--drkm
___________________________________________________________________________
Dicouvrez une nouvelle fagon d'obtenir des riponses ` toutes vos questions !
Profitez des connaissances, des opinions et des expiriences des internautes sur Yahoo! Questions/Riponses
http://fr.answers.yahoo.com
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] XSLT2, select nodes insid, James Cummings | Thread | RE: [xsl] XSLT2, select nodes insid, Michael Kay |
| Re: [xsl] XSLT2, select nodes insid, Andrew Welch | Date | RE: [xsl] XSLT2, select nodes insid, Michael Kay |
| Month |