[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Removing duplicate elements a-priori?

Subject: Removing duplicate elements a-priori?
From: Gordon Vidaver <gvidaver@xxxxxxx>
Date: Fri, 16 Jun 2000 17:43:18 -0400
vidaver
Hi,
I'm trying to remove duplicate elements from an output document. I've seen the examples for doing this in the archives, but they all seem to assume some knowledge of the structure of the input document. For example:


	<xsl:for-each select="item[not(.=preceding-sibling::item)]"> 	
	  <xsl:sort/>

But with this you need to know that there is an element named "item" in the input.

For example I want to take :

	<doc>
	<employee>Bill</employee>
	<employee>Andy</employee>
	<employee>John</employee>	
	</doc>

And produce just :

	<doc>
	<employee>Bill</employee>
	</doc>

without knowing that there is an employee tag in the input.

Any help would be most appreciated.

Thanks,

Gordon Vidaver


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.