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 réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son
interface révolutionnaire.
http://fr.mail.yahoo.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--