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

RE: grouping by unique...

Subject: RE: grouping by unique...
From: "Lars Huttar" <lars_huttar@xxxxxxx>
Date: Wed, 18 Jun 2003 14:35:16 -0500
RE:  grouping by unique...
[I wrote]
> I think what you really want to do is apply templates
> to <solution>s instead of <item>s, and modify your select=
> like this:
> 
>     <xsl:if test="generate-id(..) = 
> generate-id(key('solution-key', .)[1])">

P.S.
Since you're looking at a "large amount of nodes", I wouldn't
use apply-templates at all; just combine the select and the
if test into a for-each:

  <xsl:template match="report">
    <!-- using Muenchian technique to display a list of unique solutions -->
    <xsl:for-each select="item/metadata/solution[generate-id(..) =
                          generate-id(key('solution-key', .)[1])]">
      <xsl:sort select="." />
      <xsl:value-of select="." />
    </xsl:for-each>       
  </xsl:template>
  
That might make things faster.

Lars


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.