Subject: [xsl] RE : Re: [xsl] Accessing elements with key via string in variable From: Florent Georges <darkman_spam@xxxxxxxx> Date: Mon, 26 Jun 2006 12:21:14 +0200 (CEST) |
Tim Lebo wrote: > I got the output I was looking for by adding a variable in > my root template: > <xsl:template match="/"> > <xsl:variable name="input" select="*"/> > and modifying the key access on line 14 to: > <xsl:value-of select="concat(.,' > ',count(key('things-by-a',.,$input)),$NL)"/> > Is there a cleaner way to do it? I don't think so. Personnaly, I use the three-parameters version of key() only when I need a subtree, not a document. If I just need to set the context node for the calling point, I use instead: $input/key('things-by-a', .) But I guess it is a matter of taste. Regards, --drkm ___________________________________________________________________________ Yahoo! Mail riinvente le mail ! Dicouvrez le nouveau Yahoo! Mail et son interface rivolutionnaire. http://fr.mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Accessing elements with k, Tim Lebo | Thread | RE: [xsl] RE : Re: [xsl] Accessing , Michael Kay |
Re: [xsl] can't get variable conten, Georg Hohmann | Date | Re: [xsl] can't get variable conten, Florent Georges |
Month |