This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
sorting & counting
- To: <xsl-list at mulberrytech dot com>
- Subject: sorting & counting
- From: "Igor Semenko" <isemenko at stel dot sebastopol dot ua>
- Date: Wed, 28 Jun 2000 00:35:20 +0300
- Reply-To: xsl-list at mulberrytech dot com
Hi all,
Can someone suggest a solution for the following:
I have a tree like:
<node priority="2">
<name>Node1</name>
<node priority="1">
<name>Node2</name>
</node>
<node priority="2">
<name>Node3</name>
<node priority="3">
<name>Node4</name>
...
</node>
...
</node>
...
</node>
and need to:
1. sort them by 'priority'
2. leave, say, only 3 nodes in the result
applying to the example it should be:
Node4
Node3
Node1
(Node2 skipped)
Please help or answer whether it can be done at all by XSLT processor (I use
Xalan).
Thank you in advance,
Igor
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list