W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2002

Clarification on enumerations

From: Michael Leditschke <mike@ammd.com.au>
Date: Tue, 18 Jun 2002 22:25:24 +1000
To: <xmlschema-dev@w3.org>
Message-ID: <LOBBICBLDJIJHPNJFPOLAEMGCHAA.mike@ammd.com.au>

If I read the datatypes spec correctly, the 
following definition

<xs:simpleType name="AFewNumbers>
  <xs:restriction base="xs:decimal">
    <xs:enumeration value="1.2"/>
    <xs:enumeration value="5.5"/>
  </xs:restriction>
</xs:simpleType>

would not prevent lexical representations such
as +00001.2 and 5.5000000000 appearing in 
instances and being declared valid by the schema. 
Is this correct?

I'm assuming it is because enumerations operate on
the value space, and 1.2 and 5.5 each have an infinite
set of equivalent lexical representations.

Thanks
Michael
Received on Tuesday, 18 June 2002 08:25:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:31 GMT