|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE : Re: Accessing elements with key via string
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








