xsl-list
[Top] [All Lists]

RE: Sorting and re-ordering down a hierarchy

2003-07-23 00:24:00
Of course!

Thought that the sorting would be on the current node, but it is of course compared to the template selected nodes. Then it was just a fluke that I seemingly got the first level to function.

Thanks David and Americo for spelling it out to me.

And I hope that Chris Cole, the original poster, can also use this solution.

Ragulf Pickaxe :)

When defining what to use for sorting, you do so in the context of the nodes
being sorted - so where you have, in both cases:

        <xsl:sort select="node/rank" data-type="number"  order="ascending"/>

I think you should have

        <xsl:sort select="rank" data-type="number"  order="ascending"/>

With that change I think your code works fine.

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list