This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: xsl filtering duplicate nodes
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] xsl filtering duplicate nodes
- From: Tom Melkonian <melkonian at entelos dot com>
- Date: Thu, 29 Mar 2001 11:11:36 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
Actually Jeni sent me the following which seems to be working for me....
Thanks for your help
Tom Melkonian
>One method would be to process all the Reference elements, but within
>the template or xsl:for-each test whether there was a preceding
>sibling with the same @id and @found as the current one, and only
>process the element if there isn't:
>
> <xsl:if test="not(preceding-sibling::Reference
> [@id = current()/@id and
> @found = current()/@found])">
> ...
> </xsl:if>
-----Original Message-----
From: Michael Kay [mailto:mhkay@iclway.co.uk]
Sent: Thursday, March 29, 2001 12:53 AM
To: xsl-list@lists.mulberrytech.com
Subject: RE: [xsl] xsl filtering duplicate nodes
The standard not(.=preceding-sibling::*) technique works only to eliminate
nodes with duplicate string-values, so it doesn't work here.
You're into Muenchian grouping, as described at www.jenitennison.com, or an
extension like the saxon:distinct() function.
Mike Kay
>
> I need to filter out only those nodes which have identical
> @id and @found
> attributes, or nodes which are exact duplicates of preceding
> nodes
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list