Re: Clarification on enumerations

"Michael Leditschke" <mike@ammd.com.au> writes:

> 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?

Yes.

> 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.

Correct.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2002, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]

Received on Tuesday, 18 June 2002 10:38:24 UTC