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

Re: An type for octets in the Binary Module

From: Florent Georges <fgeorges@fgeorges.org>
Date: Thu, 14 Mar 2013 15:58:46 +0100
Message-ID: <CADyR_r07pWNbkKJc915bFrG0RAWEztpwAdzVa2cMEwF20VDmGQ@mail.gmail.com>
To: Michael Kay <mike@saxonica.com>
Cc: public-expath@w3.org
On 14 March 2013 14:21, Michael Kay wrote:

> For arguments, we generally avoid restricted types because it's
> such a pain to have to cast things to the relevant type.  So for
> octets-to-binary, the argument should be xs:integer*, allowing
> you to do octets-to-binary((0,0,255,255)).

  Yes, I know that rule and I think it makes perfect sense for
URIs to be xs:string instead of xs:anyURI.  But still I doubt it
would be useful to pass literal integer to bin:* functions.  I'd
write the above example bin:octets-to-binary(bin:hex('00FF')).

  For me that is a way to avoid worrying about implicit unboxing
and overflowing, and in contexts it has to happen then that's the
user's responsibility to do what he/she wants exactly to happen.


Florent Georges
Received on Thursday, 14 March 2013 14:59:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:47:37 UTC