W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2001

Digit required before/after decimal point?

From: James Clark <jjc@jclark.com>
Date: Thu, 11 Jan 2001 10:47:44 +0700
Message-ID: <3A5D2CE0.18BDB2A9@jclark.com>
To: XML Schema Comments <www-xml-schema-comments@w3.org>
Is ".1" allowed as a lexical representation of a decimal? How about
"1."? How about for double and float?

For decimal, the canonical representation says it excludes leading
zeros, which would suggest that the canonical representation of "0.1" is
".1".  Is that intended?

I think things work out OK if the lexical representation always requires
a digit after the decimal point.  This would be consistent with integer
not allowing a decimal point.

What is the canonical representation of the decimal "1.0"? Presumably
"1".  Saying that trailing zeros are prohibited is rther a roundabout
way of saying this.

I would suggest things could be made much more clear, precise and
unambiguous by having the spec include a regex for the lexical
representation and the canonical representation of each the primitive
datatypes (perhaps as an annotation in the schema for datatype
definitions).

James
Received on Wednesday, 10 January 2001 22:49:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:49 GMT