This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: grouping (was: if or template?)
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: grouping (was: if or template?)
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Mon, 8 May 2000 11:54:10 +0100
- Reply-To: xsl-list at mulberrytech dot com
> I want to then display the Tracker_ID if it is unique followed by all the
data for
> the specific tracker.
A FAQ: use something like
<xsl:for-each select="//tracker-id[not(.=preceding::tracker-id)]">
This is the traditional solution; Steve Muench has just told me about a
brilliant alternative using keys:
<xsl:key name="tid" use="tracker-id" select="."/>
<xsl:for-each
select="//tracker-id[generate-id(.)=generate-id(key('tid',.)[1])]">
I hope Steve will forgive me for announcing this discovery before he does,
I'm quite excited by it because it gives much better performance.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list