When using the order-by parameter in the for-each instruction on numbers, the result is unexpected. For example, you may get the following sorting: 12 5 81 9 It seems like order-by is not treating them as numbers, but rather as text. What is the solution for this? Thanking you in advance.
You are correct. The result of the evaluation expression is always converted to a string. Therefore it looks at the first digit in the number for its first filter, then the second and so on. To order the numbers properly you must set the data-type attribute to number. <xsl:sort select="expression" data-type="number" order="ascending"/>
Joined: Oct 21, 2000
Yes, it worked, Thanks for the help
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com