Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Filtering dupes Filtering dupesTo: NULL Date: 10/3/2004 10:27:00 PM Can someone help me write the appropriate xsl transformation to output a xml document where duplicates have been filtered out. In my input document, two "rows" are duplicates if they use the same unique identifier field (as determined by an attribute called 'uniqueidfield') and the value in this field is the same. In the following example, there are two duplicate accounts with the accountid 'ABC' but there is also a contact with the same id. The output document should contain one of the two 'ABC' accounts (I don't really care which one) and it should also containt the 'ABC' contact. Input: <resultset> <result uniqueidfield="accountid"><accountid>abc</accountid><name>abc corp.</name></result> <result uniqueidfield="accountid"><accountid>def</accountid><name>def ltd.</name></result> <result uniqueidfield="accountid"><accountid>abc</accountid><name>abc corp. 2</name></result> <result uniqueidfield="contactid"><countactid>abc</contactid><name>John Smith</name></result> <resultset> Desired output: <resultset> <result uniqueidfield="accountid"><accountid>abc</accountid><name>abc corp.</name></result> <result uniqueidfield="accountid"><accountid>def</accountid><name>def ltd.</name></result> <result uniqueidfield="contactid"><countactid>abc</contactid><name>John Smith</name></result> <resultset> | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
