Hi Ken,
Thank you very much for the code. It looks like the recursion is "built-in"
with the apply-templates rule inside the match. Also, I didn't' think of the
position() function, which will help me get the correct sort. Thanks again
for the quick response.
Rick
When I think of recursion, I try to think of how applying templates would
work ... and the end result is really quite compact.
I hope the code below helps.
. . . . . . . Ken
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output indent="yes"/>
<xsl:template match="steps | step">
<xsl:copy>
<xsl:apply-templates select="text()[normalize-space()]"/>
<xsl:apply-templates select="step">
<xsl:sort select="position()" order="descending"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--