I am trying to sort all the of entry elements alphabetically by entryTitle and have the output in XML. My document has the following structure:
I was thinking something alongs the lines of this, but have had no such luck.
I'm not sure of the best way to go about debugging XSL problems. Any help would be appreciated.
Code:
<root>
<entry>
<header>
<index>A1</index>
<entryTitle>Alligators</entryTitle>
</header>
<description>text text text</description>
</entry>
<entry>
...
</entry>
</root>
I was thinking something alongs the lines of this, but have had no such luck.
Code:
<xsl:stylesheet version="1.0"
xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform">[/URL]
<xsl:output method="xml" />
<xsl:template match="/">
<xsl:apply-templates>
<xsl:sort select="root/entry/header/entryTitle" />
</xsl:apply-templates>
</xsl:template>
I'm not sure of the best way to go about debugging XSL problems. Any help would be appreciated.