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

Re: Equality of simple values - Where is my mistake?

From: Stefan Wachter <Stefan.Wachter@gmx.de>
Date: Wed, 30 Oct 2002 12:36:48 +0100 (MET)
To: ht@cogsci.ed.ac.uk;xmlschema-dev@w3.org; (Henry S. Thompson);
Message-ID: <4346.1035977808@www16.gmx.net>

Your are right. I made a mistake.

Yet, I am not happy with the current definition of equality based on the
special role of built-in primitive types. Maybe you can at least clarify this
point in XML Schema 1.1 with a few examples.

--Stefan



> Stefan Wachter <Stefan.Wachter@gmx.de> writes:
> 
> > ht writes:
> > 
> > > But that would have the bad effect of treating e.g. (string)5 as equal
> > > to (decimal)5.0, which is certainly wrong no matter how you look at
> > > it.
> > 
> > I assumed that for values to be equal they must have either the same
> type or
> > the type of one value must be a base type of the type of the other
> value.
> > Therefore, clearly
> > 
> > (string)5 != (decimal)5.0 
> > 
> > but
> > 
> > (anySimpleType)5 = (string)5 = (byte)5 = (decimal)5.000 = ...
> 
> You appear to contradict yourself -- (string)5 is and is not equal to
> (decimal)5.000
> 
> Also note that on your account, (name)a != NMTOKEN(a), because neither
> is derived from the other.
> 
> ht
> -- 
>   Henry S. Thompson, HCRC Language Technology Group, University of
> Edinburgh
>           W3C Fellow 1999--2002, part-time member of W3C Team
>      2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
> 	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
> 		     URL: http://www.ltg.ed.ac.uk/~ht/
>  [mail really from me _always_ has this .sig -- mail without it is forged
> spam]
> 
Received on Wednesday, 30 October 2002 06:37:21 GMT

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