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

Re: New draft of EXPath binary module

From: Christian Grün <christian.gruen@gmail.com>
Date: Sat, 3 Aug 2013 17:20:13 +0200
Message-ID: <CAP94bnPDi5yJN02p+QNchbKQaDkWvvP_=97d+mWebTyVxJbCtQ@mail.gmail.com>
To: Florent Georges <fgeorges@fgeorges.org>
Cc: Michael Kay <mike@saxonica.com>, EXPath <public-expath@w3.org>, John Lumley <john@saxonica.com>
>   I meant a user function (like a library to handle, say, images),
> which would like to return a sequence of binary items.  For instance:
>
>     (: split an image in 2 new images, horizontally :)
>     img:split-horizontally($img as xs:base64Binary) as xs:base64Binary+

Thanks, I got it. But I assume that bin:to-octets() and
bin:from-octets() could be used in the used-defined function before
and after the binary functions themselves are called.. As shown in the
following example:

  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?

Christian
Received on Saturday, 3 August 2013 15:20:59 UTC

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