Hi there,
This seems like it would be fairly easy, but I can't figure it out. I want to take an XML doc, run it through an XSL transformation, and have the same XML doc on the other side, but just alphabetized on an element of my choosing.
So for instance:
Should become (obviously):
I know I can use the XSL element
to get a copy of the whole tree, but how do I alphabetize it in the process? I've tried all flavors of
but that is only valid after a
or
.
Thanks very much in advance!
-Toby
This seems like it would be fairly easy, but I can't figure it out. I want to take an XML doc, run it through an XSL transformation, and have the same XML doc on the other side, but just alphabetized on an element of my choosing.
So for instance:
Code:
<excellent>
<person name=Bill/>
<person name=Ted/>
<person name=Abe/>
</excellent>
Should become (obviously):
Code:
<excellent>
<person name=Abe/>
<person name=Bill/>
<person name=Ted/>
</excellent>
I know I can use the XSL element
Code:
<xsl:copy-of>
Code:
<xsl:sort>
Code:
<xsl:for-each>
Code:
<xsl:apply-templates>
Thanks very much in advance!
-Toby