|
Subject: Baffled by xsl:sort - want to process nodes in reverse document o rder. From: Dylan Walsh <Dylan.Walsh@xxxxxxxxxx> Date: Wed, 27 Sep 2000 16:04:18 +0100 |
Hi. I am trying to process a set of elements, starting with the last, and
working towards the first. I have tried the following:
<xsl:apply-templates select="someElementType">
<xsl:sort select="position()" data-type="number"
order="descending"/>
</xsl:apply-templates>
The xsl:sort is taken straight out of Michael Kays book. However when I run
it, the elements are processed in document order. If I change "descending"
to "ascending", the output is exactly the same.
If, on the other hand, I change the select to say, the value of an
attribute, instead of position(), it sorts them in reverse alphabetical
order according to the text in that attribute. If I change "descending" to
"ascending", the output is reversed. In other words, it works for strings
but not for position().
Can anyone explain to me what is going on?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: for-each attribute, Gary L Peskin | Thread | RE: Data in Stylesheets [was: Comme, Kay Michael |
| RE: XSLT namespace, Richard Lander | Date | RE: Performing an expression on att, Kay Michael |
| Month |