[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Grouping upon various attribute values

Subject: Re: Grouping upon various attribute values
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Thu, 17 Aug 2006 00:53:03 +0200 (CEST)
xsl sort various
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.