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

Compare current node with the last node in a sorted fo

Subject: Compare current node with the last node in a sorted for-each list
From: TBrouwer@xxxxxxxxxxxxxxxxxxx
Date: Mon, 21 May 2001 14:20:58 +0200
compare the sorted node
Example:
<node1>
     <node2 attr="name4" extra="test1"/>
     <other>More1</other>
     <x>X</x>
     <y>Y</y>
     <node2 attr="name3" extra="test2"/>
     <s>S</s>
     <other>More2</other>
     <node2 attr="name2" extra="test1"/>
     <other>More3</other>
     <node2 attr="name1" extra="test1"/>
     <z>Z</z>
     <other>More4</other>
</node1>

Is it possible to display all 'node2' in alphabetic order based on the
value of the 'attr' attribute? Further, as the value of the attribute
'extra' is the same as the node before in the sorted list, then print an
extra line under that node with <same />

Wanted output:
<node2 attr="name1" extra="test1"/>
<node2 attr="name2" extra="test1"/>
<same/>
<node2 attr="name3" extra="test2"/>
<node2 attr="name4" extra="test1"/>

Thanks in advance for any suggestions....


T. Brouwer.





 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.