W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2004

Re: "an empty value - valid for hexBinary?"

From: Anli Shundi <ashundi@tibco.com>
Date: Mon, 30 Aug 2004 10:16:24 -0400
To: Kasimier Buchcik <kbuchcik@4commerce.de>
Cc: xmlschema-dev@w3.org
Message-id: <413336B8.1030000@tibco.com>

I think it is valid!  The spec says [1]

[Definition:]   hexBinary represents arbitrary hex-encoded binary data. 
The ˇvalue spaceˇ of hexBinary is the set of finite-length sequences of 
binary octets.

That includes the empty sequence as well!

Furthermore, the Second Edition of XMLSchema [2] has a regular 
expression for base64Binary which explicitly allows empty (base64) 
encodings.  hexBinary is just another encoding of byte sequences.

[1] http://www.w3.org/TR/xmlschema-2/#hexBinary
[2] http://www.w3.org/TR/2004/PER-xmlschema-2-20040318/#base64Binary


On 8/30/2004 6:08 AM, Kasimier Buchcik wrote:

> Hi,
> does the built-in primitive datatype "hexBinary" allow an empty value?
> I noticed that Xerces-J 2.5.1 does not bark on an empty element of type 
> "hexBinary" (<foo/>), but MS 4.0 does. I did not found an indication in 
> the spec for the empty value to be valid, so I wonder if it's just a 
> Xerces bug.
> Regards,
> Kasimier

Anli Shundi					ashundi@tibco.com
TIBCO Software Inc.				office: (919) 969-6518
Received on Monday, 30 August 2004 14:17:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:23 UTC