W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2000

lexical space of decimal

From: Morris Matsa <mmatsa@us.ibm.com>
Date: Tue, 19 Dec 2000 18:27:45 -0500
To: www-xml-schema-comments@w3.org
Message-ID: <OF7FC26D3B.FFE97793-ON852569BA.0070C928@somers.hqregion.ibm.com>

Can you tell me what is allowed in the lexical space of a "decimal"?

It is defined in section 3.2.5.1
(http://www.w3.org/TR/xmlschema-2/#decimal), as including "+0.0" and "
-0.0", and given the other rules (that the leading sign can be omitted,
leading and trailing zeroes are optional, and if the fractional part is
zero then the period and following zero(es) can be omitted) it also
includes ".0", "0.", ".", "0", "".

I'm assuming that leading zeroes are not optional if the leading sign is
explicit (because the zeroes are no longer leading!) - thus "+" and "-" are
not allowed.

Which of my assumptions are incorrect?

If all my assumptions are correct, the Canonical representation of decimal,
as defined in 3.2.5.2, is incomplete:  It allows 4 different "simple"
canonical representations for the value zero: "-0", ".", "-0.", ""  (The
non-simple ones seem to be -00, -00., -000, -000., -000, etc.)  Also note
that if the spec means that "leading zeros" are still leading after an
explicit sign then "+" and "-" become allowed lexical decimal values, and "
-" would become an additional canonical representation for the value zero,
leaving exactly four: "-", "-.", ".", "".

Prohibiting a trailing decimal point in the canonical representation would
be useful.  Was this meant to be prohibited for the lexical representation?

Where am I going wrong and what is a "decimal"?
Received on Tuesday, 19 December 2000 18:28:40 GMT

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