Bug #3905
closedIncorrect casting of xs:untypedAtomic in XDMString.compareTo()
100%
Description
In Atomic.js XDMString.compareTo()
casts strings that are untypedAtomic to the other operand type. This is in line with the semantics of General Comparisons for operators such as <. However, evaluation of gc
already performs that action in such cases and resolution of vc
precasts an untypedAtomic to a string, so this operation should be unnecessary.
QT3 test sort-array-025 fails because in
array:sort([xs:untypedAtomic('2015-06-12+01:00'),current-date()]
the comparison uses the XDMString.compareTo(xs:date) and hence incorrectly casts the string to xs:date
, avoiding the incomparability error check, as would fn:sort()
in such circumstances. Thus the cast in XDMString.compareTo must not perform that cast. As far as I can see all necessary GeneralComparisons or ValueComparisons do necessary precasting.
Updated by Norm Tovey-Walsh about 3 years ago
- Status changed from Resolved to Closed
Updated by Debbie Lockett about 3 years ago
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 1.2.0
- Fix Committed on JS Branch 1.0, Trunk added
Very belatedly marking fixed in Saxon-JS 1.2.0 maintenance release.
Please register to edit this issue
Also available in: Atom PDF Tracking page