|
Summary
Sorting the output result tree and the use axis.
Hi,
When I was developing the snippet Table with more than one column
http://www.topxml.com/code/?p=3&id=v20020401101524
I was faced with the problem that this couln't be sorted, this is by specification.
Take a look at this http://www.w3.org/TR/xpath#axes, specially this
<qoute> the following axis contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding attribute nodes and namespace nodes </quote>
This was a prolem, so whenever you are using axis you are using document order, no matter what you have specified in the <xsl:sort> element.
OK, so I've made this small snippet to try and workarround this. The problem is that this is dependend of the processor specific node-set function, I've made the snippet that will work for any processor that use XSLT1.1 or above and for MSXML and Saxon, you can implement other, if they have a node-set function.
Hope you enjoy this...
Pedro Gil
| Further additional information | |
Updating comments...
Updating comments...
|
|