Click to See Complete Forum and Search --> : xsl:apply-templates and xsl:for-each can't combine?


Eli Gassert
May 17th, 2002, 12:34 PM
Hello,

Basically I'm trying to go though an XML object and reorder the data inside of it. I want to add a string of "xsl:sort" like this:

<xsl:copy>
<xsl:apply-templates select="*|@*|text()">
<xsl:sort select="@*[3]" order="ascending" data-type="text" />
<xsl:sort select="*" order="ascending" data-type="text" />
</xsl:apply-templates>
</xsl:copy>

see I have @*[3], well I want to make a loop to dynamically loop through each attribute and add a sort by. Is this possible? Any "rigged" method of doing it either?

The namespace I'm using is:
http://www.w3.org/1999/XSL/Transform

thanks!
-eli