this is a german Web-Mirror of MHONARC.ORG powered by Domainunion AG

[Top] [All Lists]

RE: [xsl] Sorting nested steps

2013-07-31 07:53:25
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.


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="";

<xsl:output indent="yes"/>

<xsl:template match="steps | step">
     <xsl:apply-templates select="text()[normalize-space()]"/>
     <xsl:apply-templates select="step">
       <xsl:sort select="position()" order="descending"/>


XSL-List info and archive:
To unsubscribe, go to:
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>

<Prev in Thread] Current Thread [Next in Thread>