This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Compare current node with the last node in a sorted for-each list


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]