Actions
Bug #5545
closedWhy does @data-type on xsl:sort claim only text and number are supported?
Start date:
2022-05-27
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
10, 11, trunk
Fix Committed on Branch:
11, trunk
Fixed in Maintenance Release:
Platforms:
Description
Consider:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="3.0">
<xsl:output method="text" encoding="utf-8"/>
<xsl:template match="/">
<xsl:variable name="fred">
<xsl:perform-sort select="('3', '2', '1', '5')">
<xsl:sort data-type="xs:integer"/>
</xsl:perform-sort>
</xsl:variable>
<xsl:sequence select="$fred"/>
</xsl:template>
</xsl:stylesheet>
And the description of data-type
on xsl:sort
:
data-type? { "text" | "number" | eqname } Determines whether collating is based on alphabetic sequence or numeric sequence. The permitted values are either text or number, or a built-in type in XML Schema, such as xs:date or xs:decimal.
Saxon 9 and 11 both say:
Warning at char 1 in xsl:perform-sort/@select on line 11 column 53 of out.xsl:
SXWN9000: Evaluation will always throw a dynamic error: data-type on xsl:sort must be
'text' or 'number'
What obvious mistake have I made?
Please register to edit this issue
Actions