This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Removing Duplicates


From: "Michael Kay" <mhkay@iclway.co.uk>
To: <xsl-list@lists.mulberrytech.com>
Subject: RE: [xsl] Removing Duplicates
Date: Fri, 2 Feb 2001 09:42:57 -0000
Message-ID: <001501c08cff$201881c0$9c0a3c3e@oemcomputer>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Importance: Normal
In-Reply-To: <a0500194cb69fa415da6f@[192.168.254.9]>

>  I want to remove duplicate nodes by looking at an attribute

There are two basic approaches:

(a) the simple approach is along the lines of
select="element[not(@attr=preceding::element/@attr)]"

(b) the Muenchian approach, using keys. This is more powerful and more
efficient but requires a bit more coding.

See www.jenitennison.com for details.

Mike Kay

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]