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

using xsl to check for duplicate elements

Subject: using xsl to check for duplicate elements
From: Pankaj Jain <pjain@xxxxxxxxxxx>
Date: Tue, 23 Oct 2001 23:19:53 +0100
 using xsl to check for duplicate elements
Hi all, 
Is there a way to check an XML file for duplicate elements and eliminate the
second one?  i.e. If I have the following XML:


<?xml version="1.0" standalone="yes">
<Instruments>
    <Equity>
        <ISSUE_ID>108558</ISSUE_ID>
        <RIC>IBM.N</RIC>
        <CTRY_ID>648</CTRY_ID>
        <EXCH_ID>224</EXCH_ID>
        <NAME>IBM</NAME>
        <EXCH_ID>224</EXCH_ID>
        <ISSUE_ID>108558</ISSUE_ID>
        <CTRY_ID>648</CTRY_ID>
    </Equity>
</Instruments>
        

What would I do in XSL to create a new XML file that looks like the
following:

<?xml version="1.0" standalone="yes">
<Instruments>
    <Equity>
        <ISSUE_ID>108558</ISSUE_ID>
        <RIC>IBM.N</RIC>
        <CTRY_ID>648</CTRY_ID>
        <EXCH_ID>224</EXCH_ID>
        <NAME>IBM</NAME>
    </Equity>
</Instruments>

Thanks
Pankaj

-----
Pankaj Jain


----------------------------------------------------
This email with all information contained herein or attached hereto may
contain confidential and/or privileged information intended for the
addressee(s) only.  If you have received this email in error, please contact
the sender and immediately delete this email in its entirety and any
attachments thereto..



 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.