W3C home > Mailing lists > Public > public-expath@w3.org > March 2013

Re: [Fwd: Binary proposal]

From: Michael Kay <mike@saxonica.com>
Date: Wed, 13 Mar 2013 14:32:09 +0000
Message-ID: <51408DE9.9050305@saxonica.com>
To: Christian Grün <christian.gruen@gmail.com>, public-expath@w3.org, Jirka Kosek <jirka@kosek.cz>

- As binary operators (and, or, not, xor) are pretty low-level, wouldn’t 
it make sense to restrict them to single octets (i.e., items of type 
xs:integer)? Otherwise, the operation $a ^ $b would need to be written 
as bin:binary-to-octets(bin:binary-xor(bin:octets-to-binary($a), 
bin:octets-to-binary($b)))). What about binary:xor($a, $b)? ;)

Yes, I had similar thoughts after looking at some use cases. I think 
defining these on xs:integer (not restricted to a single octet, 
however!) would make sense. There are use cases for and/or/not over 
large binary values (basically when using a binary value as a BitSet), 
but they are not as important as use cases that are basically packing 
bits into an integer.

Michael Kay
Received on Wednesday, 13 March 2013 14:32:35 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:52:20 UTC