I have a slightly different sorting question than has been proposed before.
My docuement looks like:
<Records>
<Record>
<Sequence>5</Sequence>
<Name>E</Name>
</Record>
<Record>
<Sequence>1</Sequence>
<Name>A</Name>
</Record>
<Record>
<Sequence>4</Sequence>
<Name>D</Name>
</Record>
<Record>
<Sequence>2</Sequence>
<Name>B</Name>
</Record>
<Record>
<Sequence>3</Sequence>
<Name>C</Name>
</Record>
</Records>
Sorted it would look like:
<Records>
<Record>
<Sequence>1</Sequence>
<Name>A</Name>
</Record>
<Record>
<Sequence>2</Sequence>
<Name>B</Name>
</Record>
<Record>
<Sequence>3</Sequence>
<Name>C</Name>
</Record>
<Record>
<Sequence>4</Sequence>
<Name>D</Name>
</Record>
<Record>
<Sequence>5</Sequence>
<Name>E</Name>
</Record>
</Records>
The <Name> node is just some a sample in the real application the <Record>
has a lot of different data. I would like to sort the whole <Record> on
<Sequence>. So every thing that is in the <Record> would move based on the
value of <Sequence> so it is sorted. If I read this in a DOM and user XSLT
conceptually it is just moving nodes around but I end up with a kludgy
algorithm that removes nodes and inserts them and takes too much time. Any
ideas?
Thank you.
Kevin