Subject: Re: [xsl] Grouping upon various attribute values From: Florent Georges <darkman_spam@xxxxxxxx> Date: Thu, 17 Aug 2006 00:53:03 +0200 (CEST) |
David Carlisle wrote: > <xsl:function name="f:key"> > <xsl:param name="nodes" as="item()*"/> > <xsl:value-of separator="|"> > <xsl:perform-sort select="$nodes"> > <xsl:sort select="name()"/> > </xsl:perform-sort> > </xsl:value-of> > </xsl:function> That requires that name() will always return the same string for two nodes with the same name (same namespace URI and same local part name), which is not guaranted. IMHO you need, as Mike proposed it, the two keys: <xsl:perform-sort select="$nodes"> <xsl:sort select="namespace-uri()"/> <xsl:sort select="local-name()"/> </xsl:perform-sort> Regards, --drkm p4.vert.ukl.yahoo.com uncompressed/chunked Wed Aug 16 22:13:41 GMT 2006 ___________________________________________________________________________ Dicouvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! Yahoo! Questions/Riponses pour partager vos connaissances, vos opinions et vos expiriences. http://fr.answers.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Grouping upon various att, David Carlisle | Thread | RE: [xsl] Grouping upon various att, Michael Kay |
Re: [xsl] Need help with XSLT: addi, Nishi Bhonsle | Date | RE: [xsl] Need help with XSLT: addi, Michael Kay |
Month |