Re: Allow hex format for integer types.

Thanks for the reply,

0x[a-zA-Z0-9] would in itself be sufficient for hex only, but it would 
still be a string and you couldn't use the extras that integers provide 
like defining a range of valid values.
Further it would be nice that a parser could accept either hex or decimal 
format, not just one single format.
This feature is common among C-style compilers, java, C# etc. C# e.g. 
defines a number of styles to characterize the format an int for parsing.

I understand that complexity vs. features trade-offs have to be made. But I 
feel that the parser wouldn't be much more complex. There are just a 
handful of parsers around, and there are much more users around that would 
benefit from such a feature.

Kind regards,

Wout de Zeeuw

Philips Medical Systems, EasyVision
Room:                 QV-123
Phone:                040-2764094
e-mail:                wout.de.zeeuw@philips.com







noah_mendelsohn@us.ibm.com

12/18/2002 09:12 PM

         To:        Liam Quin <liam@w3.org>
         cc:        Wout de Zeeuw/BST/MS/PHILIPS@EMEA2
www-xml-blueberry-comments@w3.org
www-xml-schema-comments@w3.org
         Subject:        Re: Allow hex format for integer types.

         Classification:



I don't speak officially for the XML Schema workgroup, but I think it's
fair to say that features such as Hex (or octal) representations were
considered during the design of our datatypes.  My impression is that we
rejected them as not quite making an 80/20 cut in terms of value vs. cost.
Any feature like this adds some complexity to implementations, to the
size of the specifications, to interop testing, etc.  We might then have
had to introduce constraining facets to allow one to introduce
restrictions for the case where only one or another form was desired.  We
might then have needed predefined types for each to promote interop
(HexFormInteger, DecimalFormInteger, OctalFormInteger).   So, we decided
not to head down that road.

There are many other similar compromises we had to make.  For example, one
can easily imagine many convenience forms for dates and times that are not
supported.  I am sorry that in this case we made a choice that is less
than ideal for your needs, but I think our choice was reasonable, or
certainly defensible.

------------------------------------------------------------------
Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------







Liam Quin <liam@w3.org>
Sent by: www-xml-schema-comments-request@w3.org
12/18/2002 12:49 PM


        To:     wout.de.zeeuw@philips.com
        cc:     www-xml-schema-comments@w3.org, 
www-xml-blueberry-comments@w3.org, (bcc:
Noah Mendelsohn/Cambridge/IBM)
        Subject:        Re: Allow hex format for integer types.



THnk you for contacting us.

On Wed, Dec 18, 2002 at 05:37:13AM -0500, wout.de.zeeuw@philips.com wrote:
 > Currently I'm missing the ability of integers in xml documents to be
 > defined in hex format (e.g. 0x20003cd9). In engineering environments hex

 > format is much more common and readable than the decimal format.
 >
 > But I guess that would mean a change in the xml spec and not in the
schema
 > spec.

XML itself already allows hexadecimal for numerical character references,
such as &#x3f0;, but does not otherwise know anything about integers.

You could consider using schema pattern facets to match 0x[a-zA-Z0-9]+,
I sppose.  If that is not sufficient, the schema working group may
respond to your mail.

Best,

Liam

-- 
Liam Quin, W3C XML Activity Lead, liam@w3.org, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/
Ankh's list of IRC clients: http://www.valinor.sorcery.net/clients/

Received on Monday, 23 December 2002 12:00:55 UTC