Re: [Fwd: Binary proposal]

- 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
Saxonica

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