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

Equality of simple values - Where is my mistake?

From: Stefan Wachter <Stefan.Wachter@gmx.de>
Date: Tue, 29 Oct 2002 20:20:22 +0100 (MET)
To: xmlschema-dev@w3.org
Message-ID: <11764.1035919222@www53.gmx.net>

Hi all.

The current discussion on types states that

  <isbn xsi:type="xsd:decimal">1234.0</isbn>
  <isbn>1234</isbn>

are not equal because they have different types.

If I define two new simple types

<simpleType name="b">
  <restriction base="xsd:decimal">
    <enumeration value="123"/>
  </restriction>
</simpleType>

and 

<simpleType name="r">
  <restriction base="b"/>
</simpleType>

then the values

<v1 xsi:type="b">123</v1>
<v2 xsi:type="r">123</v2>

are also not equal because they have different types, right? But both values
are valid because they are equal to the enumerated value. Therefore both
values must be equal!

Where is my mistake?

--Stefan

PS: Until now I assumed that simple values are equal iff

1. they have the same type or the type of one value is a base type of the
type of the other value and
2. the values are equal with respect to their common type or the base type,
respectively.
Received on Tuesday, 29 October 2002 14:20:54 GMT

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