[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Sorting nested steps

Subject: RE: [xsl] Sorting nested steps
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 31 Jul 2013 08:58:29 -0400

At 2013-07-31 08:53 -0400, Rick Quatro wrote:
It looks like the recursion is "built-in"
with the apply-templates rule inside the match.

Indeed ... pushing child nodes like this reflects the inherent nested nature of XML structure. It is really only "recursion" when it is the same element structure being processed.

Also, I didn't' think of the
position() function, which will help me get the correct sort.

I remind my students that the definition of position() changes during a sort: after the selection is made, position() reflects the order of the population being sorted, then after the sort is completed, position() reflects the order of the sorted results.

Good luck in your project.

. . . . . . . . Ken

-- Public XSLT, XSL-FO, and UBL classes in the Netherlands Oct 2013 | Public XSLT, XSL-FO, UBL and code list classes in Australia Oct 2013 | Contact us for world-wide XML consulting and instructor-led training | Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm | Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: https://plus.google.com/116832879756988317389/about | Legal business disclaimers: http://www.CraneSoftwrights.com/legal |

Current Thread