|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Trying to sort node set while tagging specific nodes i
I want to transform the following...
<root>
<rec>
<name>z</name>
<year>2004</name>
</rec>
<rec>
<name>z</name>
<year>2005</year>
</rec>
<rec>
<name>a</name>
<year>2002</year>
</rec>
<rec>
<name>a</name>
<year>2003</year>
</rec>
</root>...to...
In other words, sort by <name> ascending and then by <year> descending while tagging the most recent of each name. The sorting is easy, but tagging the most recent is proving difficult for me. I thought to use the preceding axis to test the preceding name and if it is different than the current name put in the tag attribute, but as I understand it, the precding axis applies to document order, not sort order. Is there some better way to do this? Thanks, Stan Dyck
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








