Donnerstag, 07. August 2008, Christoph Ertl
Today I added two nodes, changed the sorting and published the whole bunch. The first look at the resulting page was surprising because the sort order seemed to be totally confused.
After a while I realized that I reached the count of 11 nodes and the node with the sortOrder = 10 was displayed after the one with sortOrder = 1.
Got it? The property is compared as string.
The problem is that XSLT handles values as string unless you declare what type should be used.
So instead of sorting nodes with
<
xsl:sortselect="@sortOrder"
order="ascending"
/>
you have to set the data-type to be used for comparison
<
xsl:sortselect="@sortOrder"
order="ascending"
data-type="number"
/>
