RE: [xsl] Removing Duplicates

Subject: RE: [xsl] Removing Duplicates
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx (by way of Mulberry Technologies List Owner)
Date: Fri, 2 Feb 2001 11:51:39 -0500
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
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


Current Thread