Re: New draft of EXPath binary module

On 3.8.2013 17:20, Christian Grün wrote:

>   img:split-horizontally($img as xs:base64Binary) as xs:base64Binary+ {
>     bin:from-octets( bin:not( bin:to-octets( $img )))
>   }
> 
> It may not be as compact as the current solution, but my assumption is
> that there are much more use cases on single or a few octets than on
> arrays. Talking about requirements .. Have you already thought about
> scenarios in which complete byte arrays may need to be processed via
> binary operators?

Hi,

the trouble is that we can't make bin:and() (and other bitwise
functions) to operate both on xs:integer* and xs:base64Binary. It would
be quite strange for these functions to operate on octets if the rest of
library operates on xs:base64Binary.

If there is strong need for binary operators to work on integers it
probably would be better to introduce similar functions in another
namespace and then write something like

bit:and($value, $mask)

("bit" is not typo, it's prefix for this different namespace).

    Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
------------------------------------------------------------------
    Bringing you XML Prague conference    http://xmlprague.cz
------------------------------------------------------------------

Received on Tuesday, 6 August 2013 11:26:36 UTC