Project

Profile

Help

Bug #2151

closed

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

Added by Michael Kay about 10 years ago. Updated almost 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.

Please register to edit this issue

Also available in: Atom PDF