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

lexical value of decimal type

From: K.Kawaguchi <k-kawa@bigfoot.com>
Date: Wed, 24 Jan 2001 13:17:07 -0800
To: www-xml-schema-comments@w3.org
Message-Id: <20010124130458.43F1.K-KAWA@bigfoot.com>

spec says

> 3.2.5.1 Lexical representation
> decimal has a lexical representation consisting of a finite-length
> sequence of decimal digits (#x30-#x39) separated by a period as a
> decimal indicator, in accordance with the scale and precision facets,
> with an optional leading sign. If the sign is omitted, "+" is assumed.
> Leading and trailing zeroes are optional. If the fractional part is
> zero, the period and following zero(es) can be omitted.
> For example: -1.23, 12678967.543233, +100000.00. 

I have a problem understanding what exactly this "decimal digits separated
by a period" means.

So let me ask some quick questions.

Is ".001" a valid decimal?
Is "100." a valid decimal?
  (if "separation" allows 0-length, it should be valid)


If so, then ".000" is also a valid decimal. Is this correct?

If so, by applying a rule (the fracional part is zero, the period and
following zeroes can be omitted), "" is also a valid decimal, which
means 0. Is this correct?

And by the adding optional leading sign, "+" is another valid decimal
that means 0. Is this correct?


I really hope BNF of every datatype will be attached to the
recommendation spec. Sometimes, natural language is not accurate enough.


regards,
----------------------
K.Kawaguchi
E-Mail: k-kawa@bigfoot.com
Received on Wednesday, 24 January 2001 16:17:03 GMT

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