This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
ordering of nodes
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] ordering of nodes
- From: Eric Smith <Eric dot Smith at fruitcom dot com>
- Date: Sat, 20 Oct 2001 00:35:04 +0200
- Reply-To: xsl-list at lists dot mulberrytech dot com
Take this xml:
<book>
<para>
This paragraph to be in order as encountered for
both target document A and B
</para>
<para b="2">
This paragraph to be in order as encountered for target A
but to appear after the subsequent paragraph in target B
</para>
<para b="1">
Another paragraph
</para>
<para>
And however many others
</para>
...
</book>
Based on the value of a variable (which I use to define various
output types), I want the order to be either as encountered in the
xml or with (say) those two paragraphs transposed.
OF course the ordering can be a lot more complex but the above
example should give the idea. Now, I do not want to have to give
each paragraph say a unique index number say in an attribute because
it may sometimes only be an occasional transposition or two that I
require. In the above requirement, I only apply attributes to the
two nodes.
How do I order them?
--
Eric Smith - currently xalan and fop on linux
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list