Re: Comment on "Allow both xs:base64Binary and xs:hexBinary as arguments"

On 4 July 2013 15:19, Jirka Kosek wrote:

> I'm not expert on type system used in XPath, but I think that return
> type should be one of existing binary types, probably base64Binary

  Mmh, OK.  So that means that if someone passes a hex to a function,
say bin:binary-subsequence(), he/she will receive a base64 instead.
Looks pretty weird to me.

> Declaring return type as anyAtomicType but requiring in prose text to be
> it base64Binary doesn't seem much useful.

  Indeed :-)  The idea was to say that if such parameter is hex (or
base64), then the return is hex (or base64).

  I think that to remain consistent, we should either: 1/ choose one
type and stick to it (e.g. base64, if someone wants hex he/she needs
to convert first, and after), or 2/ allow both but also for the return
type (depending on the type of the parameters).

  Favouring one type for returned values but not for parameters looks
like off balance to me.

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/

Received on Thursday, 4 July 2013 13:51:39 UTC