This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2048 - R-182: clarify equality and identity of union values
Summary: R-182: clarify equality and identity of union values
Status: ASSIGNED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.0 only
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL: http://www.w3.org/2001/05/xmlschema-r...
Whiteboard:
Keywords: needsDrafting
Depends on:
Blocks: 2423
  Show dependency treegraph
 
Reported: 2005-09-08 22:42 UTC by C. M. Sperberg-McQueen
Modified: 2007-03-29 18:48 UTC (History)
0 users

See Also:


Attachments

Description C. M. Sperberg-McQueen 2005-09-08 22:42:18 UTC
[This was originally raised by Stefan Wachter and booked as
Rec comment R-182.  It's now being transferred to Bugzilla.}

A similar question (to that of R-181, see bug 2044)
concerning equality arises with union types. Having the two
union types:

  <simpleType name="u1">
    <union memberTypes="string"/>
  <simpleType>

  <simpleType name="u2">
    <union memberTypes="string"/>
  <simpleType>

are these two elements equal?

  <element xsi:type="u1">abc<element> 
  = <element xsi:type="u2">abc<element>

See: 
http://lists.w3.org/Archives/Public/xmlschema-dev/2002Nov/0081.html

Response from Henry:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002OctDec/0052.html

The Working Group discussed this issue at the May 2005 face
to face meeting and instructed the editors to prepare
wording proposals.  [The minutes do not explicitly say, but
the editors' recollection is, that the agreement was that
two unions may have overlapping value spaces, and that
equality of values is based on the identity of the value
(viewed as a member of a primitive datatype's value space),
not on the additional identity or structural similarity of
the datatypes whose value spaces it may be a member of.  In
other words, the two values in the example offered by Stefan
Wachter are identical.]

Note that we need both a 1.0 corrigendum and a wording
proposal for 1.1.  Because identity and equality are
distinct relations in 1.1 but not in 1.0, the wording
proposals will not necessarily be the same.  This
record is for the 1.0 corrigendum.
Comment 1 Dave Peterson 2005-10-14 00:42:28 UTC
(In reply to comment #0)

> Response from Henry:
> http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002OctDec/0052.html
> 
> The Working Group discussed this issue at the May 2005 face
> to face meeting and instructed the editors to prepare
> wording proposals.  [The minutes do not explicitly say, but
> the editors' recollection is, that the agreement was that
> two unions may have overlapping value spaces, and that
> equality of values is based on the identity of the value
> (viewed as a member of a primitive datatype's value space),
> not on the additional identity or structural similarity of
> the datatypes whose value spaces it may be a member of.  In
> other words, the two values in the example offered by Stefan
> Wachter are identical.]
> 
> Note that we need both a 1.0 corrigendum and a wording
> proposal for 1.1.  Because identity and equality are
> distinct relations in 1.1 but not in 1.0, the wording
> proposals will not necessarily be the same.  This
> record is for the 1.0 corrigendum.

That is also my understanding of identity and equality for 1.1:  IF
the two values are in the same primitive datatype's value space,
and are equal/identical, then in all derivations and unions they
are also equal/identical.
Comment 2 Sandy Gao 2005-10-14 16:36:18 UTC
Discussed at 2005-10-14 telecon.

Resolution: classified as "clarification with corrigendum". Instruct the editor 
to draft wording proposal along the following lines:

"The identity/equality of values in derived and union datatypes is based on 
their identity/equality in the primitive datatypes in whose value space they 
occur.  The identity/equality of lists is determined item-by-item:  all 
corresponding items must be identical/equal."