![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Sorting Question Sorting QuestionTo: NULL Date: 7/5/2004 1:41:00 PM Hi,
I have some XML :
<DATA>
<ROWS>
<ROW>
<FIELD ID='1'>
<VALUE>Z</VALUE>
</FIELD>
<FIELD ID='2'>
<VALUE>B</VALUE>
</FIELD>
</ROW>
<ROW>
<FIELD ID='1'>
<VALUE>Q</VALUE>
</FIELD>
<FIELD ID='2'>
<VALUE>D</VALUE>
</FIELD>
</ROW>
<ROW>
<FIELD ID='1'>
<VALUE>E</VALUE>
</FIELD>
<FIELD ID='2'>
<VALUE>F</VALUE>
</FIELD>
</ROW>
</ROWS>
</DATA>
I want to sort the data by the values where field id =1. I've tried this :
<xsl:apply-templates select="DATA" mode="sorted">
<xsl:sort select="ROWS/ROW/FIELD[@ID='1']/VALUE/text()" />
</xsl:apply-templates>
but this doesn't seem to give me a sorted set of nodes.
Any ideas ?
TIA
Steve
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
