- From: James Clark <jjc@jclark.com>
- Date: Tue, 23 Jan 2001 06:49:14 +0700
- To: XML Schema Comments <www-xml-schema-comments@w3.org>
"Biron,Paul V" wrote: > > > -----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 "2.4.1.1 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. Makes sense. It would be nice if Part 1 could refer to the specific section of Part 2. What about when the two values have different whiteSpace facets? Suppose I have t1 = "x y" [token] t2 = "x y" [token] s1 = "x y" [string] s2 = "x y" [string] Which t/s pairs compare equal? Do I just compare the values after whitespace normalization according to their respective whiteSpace facets, which would imply t1 != s1, which seems a bit surprising? James
Received on Monday, 22 January 2001 19:02:07 UTC