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

RE: select-distinct in for-each ?

Subject: RE: select-distinct in for-each ?
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 4 Oct 1999 17:05:05 +0100
for each distinct
> > As you guess, I have duplicates that need to
> > be removed -- I'm looking for a select-distinct.
> 
> This is a pretty common requirement and it may be interesting to
> contemplate if xsl 1+n could offer some help for that.
> 
> At first glance it may seem that xsl:sort could have an 
> option that said to discard duplicates while sorting, but it probably
isn't 
> that simple.

That only solves a small subset of the problem.

If you're looking for possible XSL extensions, start with the SAXON group-by
construct (http://users.iclway.co.uk/mhkay/saxon). That essentially allows
you to apply some extra processing at the start and end of every group of
consecutive elements with the same value for some expression. I've found
this solves pretty well all of the practical grouping problems I've seen on
this list, with the possible exception of multi-level grouping and possibly
totalling over a group (though there are other SAXON extensions to handle
that). 

Mike Kay


 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.