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

An type for octets in the Binary Module

From: Florent Georges <fgeorges@fgeorges.org>
Date: Thu, 14 Mar 2013 13:55:25 +0100
Message-ID: <CADyR_r2ZYHi4XQysiNxD1EiPOgRWe=tgJaYNwksAa_bqLxOxPA@mail.gmail.com>
To: EXPath CG <public-expath@w3.org>
  Hi,

  First, thank you Jirka for this great quality "first draft" of
the Binary Module!

  So if I understand correctly, binary-to-octets() returns
xs:integers because xs:byte <http://w3.org/TR/xmlschema-2/#byte>
is not supported by XQuery nor by XSLT/Basic.  Even though
xs:byte would be perfect here has it has exactly the same value
space as an octet.

  Would it be possible to define a new type, say bin:octet, which
derives from xs:decimal or xs:integer, with the same facets as
xs:byte, and to use it in the signature of the functions?

  As far as I know, XSLT allows that explicitly for extension
functions <http://w3.org/TR/xslt20/#built-in-types> (at least),
XQuery also allows an implementation to augment the schema type
list <http://w3.org/TR/xquery/#id-xq-static-context-components>,
and I am pretty sure XPath allows the same thing (even though
I couldn't find the exact verse right now).

  If we are going to work on individual single octets, it would
make sense to me to constraint the value space of data flowing in
and out the bin:* functions.

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/
Received on Thursday, 14 March 2013 12:56:15 GMT

This archive was generated by hypermail 2.3.1 : Thursday, 14 March 2013 12:56:16 GMT