Bug #2151
closedDynamic type of the result of min()/max()
0%
Description
The rules for the dynamic type of the result of min()/max() are rather strange, and not correctly implemented by Saxon, in 9.5 and all earlier releases.
The rules say that numeric and xs:anyURI values should be converted to the "least common type" present in the sequence. But Saxon is applying this rule to all types, for example to strings. So if the input contains a mix of xs:NCName and xs:ID values, the result according to the spec should be either an NCName or an ID, but Saxon actually returns a value belonging to the common supertype.
It doesn't help that the rule has been changed a number of times: it's written differently in XPath 2.0, 3.0, and 3.1, and there is also an erratum in this area. However, it's dealing with an edge case that will affect few users.
The function has been reimplemented in 9.6 to follow the rules correctly, and also to follow the stricter rules of the 3.1 draft specification. The change could/should be retrofitted, but it is not urgent.
Updated by Michael Kay about 10 years ago
- Status changed from New to Resolved
Closing this. It's fixed in 9.6 and we're not planning to fix it in 9.5. Note that the spec changes (slightly) in XPath 3.1.
Updated by O'Neil Delpratt about 10 years ago
- Status changed from Resolved to Closed
- Fixed in version changed from 9.6 to 9.6.0.2
Bug fix applied in the Saxon 9.6.0.2 maintenance release
Updated by O'Neil Delpratt almost 9 years ago
- Sprint/Milestone set to 9.6.0.2
- Applies to branch 9.5, 9.6 added
- Fix Committed on Branch 9.6 added
- Fixed in Maintenance Release 9.6.0.2 added
Please register to edit this issue