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]

sorting & counting



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

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