This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22839 - [XP3.1] Ordering on binary types
Summary: [XP3.1] Ordering on binary types
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.1 (show other bugs)
Version: Working drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-30 19:33 UTC by Michael Kay
Modified: 2015-07-06 08:25 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2013-07-30 19:33:26 UTC
The types xs:hexBinary and xs:base64Binary are currently unordered (that is, the operators le/ge/lt/gt are not defined). It is clearly possible to define an ordering for these types.

Making the types ordered is desirable for three reasons:

(a) orthogonality: it's an arbitrary restriction and we shouldn't have arbitrary restrictions.

(b) a new function collation-key() is being introduced under the maps proposal. At present this only supports equality matching, but there are obvious use cases for ordered collation keys. Collation keys are often binary (e.g. in the UCA algorithm for generating collation keys; this will generate a requirement for ordering of binary values

(c) an EXPath initiative is currently defining a library of functions for handling binary data. It is possible for such a community initiative to define new functions, but not to define new operators. The existence of such a function library will make use of the binary data types more popular, and generate a demand for doing magnitude comparisons.
Comment 1 Jonathan Robie 2014-05-13 15:34:36 UTC
This is implemented in the current spec, the WG has approved it.
Comment 2 Michael Kay 2015-07-06 08:25:49 UTC
Confirmed that the change has been applied.