Project

Profile

Help

Bug #2151

closed

Dynamic type of the result of min()/max()

Added by Michael Kay about 10 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
XPath conformance
Sprint/Milestone:
Start date:
2014-09-24
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.5, 9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

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.

Actions #1

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.

Actions #2

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

Actions #3

Updated by O'Neil Delpratt about 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

Also available in: Atom PDF