W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2003

Decimal validation of '12.'

From: <tpchan@itsd.gov.hk>
Date: Fri, 5 Sep 2003 16:12:56 +0800
To: xmlschema-dev@w3.org
Message-ID: <OFC196452C.E1A586C6-ON48256D98.002BD090-48256D98.002D21E8@support.gcn.gov.hk>

Consider the schema definition of the following field

<xs:simpleType name="N14.2Type" id="CC0010">
            <xs:restriction base="xs:decimal">
                  <xs:totalDigits value="13"/>
                  <xs:fractionDigits value="2"/>

For an input of '12.'  XML spy v5 consider it not valid But xerces consider
it is ok,

From the W3c spec, it is mentioned that:

If the fractional part is zero, the period and following zero(es) can be
omitted. For example: -1.23, 12678967.543233, +100000.00, 210.

The question is, does it means both the period and following zeros have to
be omitted together or if just the following zeros is omitted, it is still
ok  ?

Thank you.
Received on Friday, 5 September 2003 04:15:04 UTC

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