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

> 
>  Just to be sure...  So if an untyped atomic or an untyped node is
> passed, it is an error unless the user explicitly convert it to, say,
> xs:base64Binary?
> 

Yes, I think that rule (A) would be the consequence.

Of course, we could have a rule (B) that a string/untypedAtomic is cast to hexBinary. Or (C) that it's cast to base64Binary. Or (D) that we try both and choose the first one that works (i.e. simulate union(hexBinary, base64Binary). 

The advantage of (A) is that its unambiguous.

Rule (B) might be preferable for use cases where we want to supply a binary value as a literal: for example

bin:find($in, "A0A0A0A0")


Michael Kay
Saxonica

Received on Thursday, 4 July 2013 09:38:41 UTC