Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#899 Numeric sort key with data-type="text"

v9.1
closed
Michael Kay
5
2012-10-08
2008-12-08
Michael Kay
No

In XSLT, with xsl:sort, if the sort key computed using the select expression is numeric (for example @length*@width), but the data type is explicitly set to text, an error is reported

XTDE1030: Non-comparable types found while sorting: net.sf.saxon.value.StringValue cannot be cast to net.sf.saxon.value.NumericValue

The correct behaviour is to convert the sort keys to strings and compare them as strings.

This bug is present in all known releases. A new test case sort145 has been created and submitted to the W3C test suite.

A patch is being committed to Subversion on the 9.1 branch.

Discussion

  • Michael Kay
    Michael Kay
    2008-12-17

    Fixed in 9.1.0.5