Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: How to get the DISTINCT values? How to get the DISTINCT values?To: NULL Date: 5/29/2008 7:26:00 AM I use xsl version 2 to transform xml data
This is the input xml file
<?xml version="1.0"?>
<csv xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<line>
<field>210.84</field>
<field>0</field>
<field>1</field>
<field>2</field>
<field>3</field>
</line>
<line>
<field>210.84</field>
<field>0</field>
<field>1</field>
<field>2</field>
<field>3</field>
</line>
<line>
<field>210.84</field>
<field>6</field>
<field>5</field>
<field>4</field>
<field>3</field>
</line>
<line>
<field>210.84</field>
<field>6</field>
<field>5</field>
<field>4</field>
<field>3</field>
</line>
<line>
<field>210.84</field>
<field>6</field>
<field>5</field>
<field>4</field>
<field>3</field>
</line>
</csv>
We need to get the DISTINCT values in the field[2] in each element
<line>
We have for this example two distinct value which are 0 and 6 in the
elements <field[2]>. We need to have an output for these distinct
values and the two elements following them. The output should be:
<?xml version="1.0"?>
<csv xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<line>
<field>0</field>
<field>1</field>
<field>2</field>
</line>
<line>
<field>6</field>
<field>5</field>
<field>4</field>
</line>
</csv>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
