Re: [XSCH] XPath eq, practical datatype issues and formal specification

Jeremy,

Some early comments of the current version of 

http://www.w3.org/2001/sw/BestPractices/XSCH/xsch-sw/ .

1) I am trying to understand the ~ relationship. Do you mean to say that ~ is a set of sets, each of which contains all  the typed literals corresponds to the a data value? Hence in RDF(S), 

~ = {X| X = IL^-1(lv) for each lv in LV},

and in OWL DL, 

~ = {X| X = L^-1(lv) for each lv in LV}.

I understand the above definitions don't cover plain literals; anyway, it is not hard to extend IL and L to cover them. 

2)  In XML Schema Part 2, equality is CLEARLY defined as follows [1]:

["Equality" in this Recommendation is defined to be "identity" (i.e., values that are identical in the ·value space· are equal and vice versa).]

Therefore we have 

 L2S(xsd:decimal)("3.2") = L2S(xsd:float)("3.2") 

 is true, but

L2S(xsd:float)("3.2") = L2S(xsd:decimal)("3.20000000000000000001") 

is false; the latter one is FALSE because L2S(xsd:decimal)("3.20000000000000000001")  is not in the value space of xsd:float. 

However, XML Schema Part 2 does not require that all its applications have to stick to the above definition of equality; on the contrary, applications "may use different definitions of equality for computational purposes". Accordingly, it suggests a  mapping between different data values as follows [1]:

[A literal in the ·lexical space· representing a decimal number d maps to the normalized value in the ·value space· of float that is closest to d in the sense defined by [Clinger, WD (1990)]; if d is exactly halfway between two such values then the even value is chosen.]

Therefore, we have

"3.20000000000000000001"^^xsd:decimal mapsTo(xsd:decimal,xsd:float)  L2S(xsd:float)("3.2") 

is true, where mapsTo(xsd:decimal,xsd:float) is the mapping from xsd:decimal to xsd:float. 

Now if we want to use eq to cover both = and mapsTo,  we can constrain a D-interpretation  with the additional following condition:

if <aaa,x>, <aaa',x'> are in D then for any two typed literals "sss"^^ddd, "sss'"^^ddd' in V with I(ddd) = x and I(ddd')=x', such that 
(i) sss is in the lexical space of x and sss' is in the lexical space of x', and 
(ii) L2V(x)(sss) = L2V(x')(sss')  or <"sss"^^ddd, L2V(x')(sss')> is in mapsTo(ddd,ddd'),
then <IL("sss"^^ddd), IL( "sss'"^^ddd' )> is in I(eq). 

Note that if sss is in the lexical space of x, IL("sss"^^ddd) = L2V(x)(sss), according to RDF Semantics [2].

Greetings,
Jeff

--
Dr. Jeff Z. Pan  ( http://DL-Web.man.ac.uk/ )
School of Computer Science, The University of Manchester



[1] http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#float
[2] http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#DTYPEINTERP




----- Original Message ----- 
From: "Jeremy Carroll" <jjc@hplb.hpl.hp.com>
To: "Jeremy Carroll" <jjc@hplb.hpl.hp.com>
Cc: "Jeff Pan" <pan@cs.man.ac.uk>; "SWBPD" <public-swbp-wg@w3.org>
Sent: Monday, November 29, 2004 5:39 PM
Subject: [XSCH] XPath eq, practical datatype issues and formal specification



Jeremy Carroll wrote:
 > (but
> I've also got a soufflé to bake ...)

I am just about to start cooking ...

but I have checked in what I've done so far on value spaces it is at:

http://www.w3.org/2001/sw/BestPractices/XSCH/xsch-sw/

particularly

http://www.w3.org/2001/sw/BestPractices/XSCH/xsch-sw/#sec-values

I've started on the hard bit, which is trying to articulate how what is 
essential a practical programmers idea of equality (XPath eq) can be 
used within RDF and OWL despite, in the corner cases, being neither 
transitive nor reflexive.

Any help would be appreciated:

http://www.w3.org/2001/sw/BestPractices/XSCH/xsch-sw/#sec-values-eq

I hope to continue this tomorrow a bit, but I have less time than today.

Jeremy

Received on Tuesday, 30 November 2004 17:28:19 UTC