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

On 4 July 2013 16:27, Michael Kay wrote:

> But it's difficult to know how to name such an item type.  Users
> will want to use this type name in "as" attributes.

  Yes, that was the idea.

> Although the specs sort-of-allow new item types to be introduced
> (XSLT is clearer on this than XQuery), they don't require
> implementations to provide the facility, and they don't provide any
> standards for naming such types.  So it doesn't feel portable enough
> for a cross-product library, especially one that people will want to
> implement on XQ 1.0 or XSLT 2.0 processors.

  Good point.  Would a little survey help here?  That is, to know
which implementation supports (or does not) such an additional named
type definition (as part of an extension), or whether it would be an
acceptable option if the implementation maintainers themselves are
interested in the Binary module...

> How about having two different libraries one for hexB and one for
> b64B, having the same functions but in two different namespaces?

  Why not.  But that means that functions like bin:binary-and($a,$b)
would be limited to both hex or both base64...

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

Received on Thursday, 4 July 2013 14:53:08 UTC