Subject: RE: select-distinct in for-each ? From: Kay Michael <Michael.Kay@xxxxxxx> Date: Mon, 4 Oct 1999 17:05:05 +0100 |
> > 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Controlling output element spacing, Stephane St-Denis | Thread | Re: select-distinct in for-each ?, David Carlisle |
RE: normalize as part of a 'select-, Kay Michael | Date | RE: first-of-type, Kay Michael |
Month |