|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Baffled by xsl:sort - want to process nodes in reverse docum
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








