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

Question on equality of lists

From: Stefan Wachter <Stefan.Wachter@gmx.de>
Date: Fri, 15 Nov 2002 12:53:16 +0100 (MET)
To: xmlschema-dev@w3.org
Message-ID: <20239.1037361196@www8.gmx.net>

Hi all.

When a list valued element or attribute is used as a key then the equality
of the values is important. In the following example there are 3 lists with
item types "Name", "double", "nameOrDouble":

<simpleType name="l1">
  <list itemType="Name"/>
</simpleType>

<simpleType name="l2">
  <list itemType="double"/>
</simpleType>

<simpleType name="l3">
  <list itemType="tns:nameOrDouble"/>
</simpleType>

<simpleType name="nameOrDouble">
  <union memberTypes="Name double"/>
</simpleType>

Are these lists equal?

1. Items types of lists are different but item types of items are equal:
<element xsi:type="l1">1.0 2.0</element> = <element xsi:type="l3">1.0
2.0</element>

2. Item types of lists are different but there are no items.
<element xsi:type="l1"/> = <element xsi:type="l2"/>

What are the exact rules for comparing lists? Thanks for your attention,
--Stefan
Received on Friday, 15 November 2002 06:54:44 GMT

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