W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2001

RE: Mixed type fields

From: Biron,Paul V <Paul.V.Biron@kp.org>
Date: Mon, 22 Jan 2001 10:37:38 -0800
Message-Id: <376E771642C1D2118DC300805FEAAF43014BA92D@pars-exch-1.ca.kp.org>
To: "'ht@cogsci.ed.ac.uk'" <ht@cogsci.ed.ac.uk>, James Clark <jjc@jclark.com>
Cc: XML Schema Comments <www-xml-schema-comments@w3.org>
> -----Original Message-----
> From:	ht@cogsci.ed.ac.uk [SMTP:ht@cogsci.ed.ac.uk]
> Sent:	Monday, January 22, 2001 1:51 AM
> To:	James Clark
> Cc:	XML Schema Comments
> Subject:	Re: Mixed type fields
> James Clark <jjc@jclark.com> writes:
> > What happens if fields in identity constraints evaluate to values of
> > different types for different target node-sets? This would require be to
> > compare values of different types.  Is this an error, always false,
> > false only if they do not have a common super type or what?
> Should be clarified.  I _think_ (need confirmation from the Datatypes
> editors) that values from distinct value spaces always compare not
> equal, but that a derived type's values _are_ in the same value space as
> its base type, so e.g. 
> 3 [integer] = 3 [short]
> and "foo" [string] = "foo" [token]
Yes, that is correct.  From section " Equal" of part 2 [1]

	For any values a, b drawn from the value space,
	Equal(a,b) is true if a = b, and false otherwise.
	By definition, given value space  A and value space B
	where A and B are not related by restriction, for every
	pair of values a from A and b from B, a != b.

However, looking at that I now realize I need to update the 2nd sentence to
include derivation by union as well, since unions work the same as
restriction as far as equality is concerned.


[1] http://www.w3.org/TR/xmlschema-2/#equal
Received on Monday, 22 January 2001 13:45:55 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:54 UTC