- From: Jonathan Borden <jonathan@openhealth.org>
- Date: Mon, 22 Jul 2002 10:58:42 -0400
- To: <www-rdf-logic@w3.org>
- Cc: <www-rdf-comments@w3.org>

I think much of the problem which seems to be occuring with RDF datatyping efforts is a result of RDF assuming the XML "error" of treating everything as a string i.e. there is no lexical distinction between "10" and the integer 10, except as directed by a schema. The other problem is what types of questions we are asking.The essense of the solution to this is that the equality function needs to be predicated by the type of its arguments. Now, assuming we introduce a syntactic type specification into literals e.g. xsd:decimal"10" this all might play out relatively nicely, in that we can get all the denotations we desire. When using _untyped_ literals one MUST specify which 'equality' function is being used, i.e. which type cast is being applied to the arguments. In the absense of a specific type, then the answer is only YES (equal) or NO (not equal) if this is the answer for all valid types for the literal. For example: A: untyped :John :age "20" . :Mary :size "20" . Does John's age equal(string) Mary's size: YES Does John's age equal(decimal) Mary's size:YES Does John's age equal(binary) Mary's size: illegal syntax for type it is YES for all valid equality functions => YES The string "20" is not "in range" for all ranges (e.g. xsd:binary) but that is a different question. :John :age "10" . :Billy :age "010" . Does Billy's age equal(string) John's age? NO Does Billy's age equal(decimal) John's age? YES it has different values for different equality functions => UNKNOWN B: typed When using typed literals the equality function is predicated on the types of the arguments :John :age xsd:decimal"2" . :Billy :age xsd:binary"10" . Does Billy's age equal John's age: YES :John :age xsd:decimal"2" . :Billy :age xsd:binary"11" . Does Billy's age equal John's age: NO C: schema info :John :age "10" . :Billy :age "010" . :age rdfdt:range xsd:decimal . Does John's age equal(xsd:decimal) Billy's age? YES Are "10" and "010" in range for xsd:decimal? YES So the answer to _monotonicity_ is how you ask the question :-) that is "equal" MUST BE predicated on the type of its arguments. Jonathan

Received on Monday, 22 July 2002 11:04:38 UTC