Re: An type for octets in the Binary Module

>   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 <>
> is not supported by XQuery nor by XSLT/Basic.

Er... what?

I am pretty sure that XQuery does support xs:byte, or do I miss something?
Also if I read the specs correctly, xs:byte is supported in XSLT 3.0 I
think, but not in versions before?

>  Even though
> xs:byte would be perfect here has it has exactly the same value
> space as an octet.

Yup, so we should use it if we can.

>   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 <> (at least),
> XQuery also allows an implementation to augment the schema type
> list <>,
> 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

Adam Retter

eXist Developer
{ United Kingdom }

Received on Thursday, 14 March 2013 13:44:30 UTC