|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: select-distinct in for-each ?
> > 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








