W3C home > Mailing lists > Public > www-rdf-interest@w3.org > July 2002

RE: Input sought on datatyping tradeoff

From: Bill de hÓra <dehora@eircom.net>
Date: Sat, 13 Jul 2002 16:59:29 +0100
To: "'Brian McBride'" <bwm@hplb.hpl.hp.com>, <www-rdf-interest@w3.org>
Message-ID: <000601c22a86$45de0e40$887ba8c0@mitchum>

Brian,

> Test A:
> 
>    <Jenny> <ageInYears> "10" .
>    <John>  <ageInYears> "10" .
> 
> Should an RDF processor conclude that the value of the ageInYears 
> properties for Jenny and John are the same?

There's at least two answers to this. 

First, RDF "as practiced" is almost certainly going to find these equal
by using whatever the implementation language provides by way of
string/object comparison. In that case your answer is yes. Especially if
a processor has no further information about ageInYears, which leads to
the second answer. The second is (imho) where the processor does the
'right thing' and answers by asking questions about the property
ageInYears. That is, what does ageInYears say the answer to this
question is? In that case your answer is, it depends on the semantics of
the RDF property, period.

None of this is helped, in that RDF does not have a consistent view of
literals. I have to agree with Peter Patel-Schneider on that. 


> There are variations on this test which should be considered 
> before answering.

I would certainly add these to your test case:

   <John>  <ageInYears> "ten" .
   <John>  <ageInYears> "Ten" .
 
which should make clear the point about why properties need to be
deferred to for questions such as this, *unless* literals are given
types.


> Test A2:
> 
>    <Jenny> <ageInYears> "10" .
>    <Jenny> <testScore>  "10" .
>
> Should an RDF processor conclude that the value of Jenny's ageInYears 
> property is the same as the value of Jenny's testScore property?

Again, what do the properties say?


> If the value the 
> <ageInYears> property is an integer, and the value of the 
> <title> property 
> is a string, they are not the same thing and are thus not equal.

The value of all of these /is/ a literal in RDF. You're asking how to
compare literals. Confusing literals with types isn't ok. I feel
compelled to point out that Jeremy Carroll proposed a sane way of doing
lexical compares on literals last autumn as RDFCore work.

On the other hand, if the wg is regularly asking itself questions of the
form "is this literal of type foo", then I'd suggest it just bite the
bullet and type the literal. You can do that by generalising the
language part to be a type, by adding a new part called type, or by
/insisting/ all RDF properties declare domain and range. That way all
your questions can be answered lexically by type aware processors;
otherwise they need to be allowed to do some language specific weirdness
such as Object.equals().


> The answer must be the same for all three of these A tests.

I don't see why. Help?


> Test D:
> 
>    <Jenny>      <ageInYears> "10" .
>    <ageInYears> rdfs:range xsd:decimal .
> 
>    <John>  <ageInYears>   _:a .
>    _:a     xsdr:decimal   "10" .
> 
> Should an RDF processor conclude that Jenny and John have the same 
> age?  [Note: in this example the range constraint is expressed using 
> rdfs:range.  We may have to introduce a special datatyping 
> range property, 
> but that is an independent detail for now.]

Hang on, an RDF processor won't conclude /anything/ here. What would an
RDF processor be doing knowing about XML Schema types? Yes, an XML
Schema processor might be able to conclude something. So the answer is
the answer to the question what would an XML Schema processor conclude? 

As an aside: I hope XML Schema types aren't being baked into RDF via
problems posed by comparing literals (I fear a memo from James Clark may
wing its way to RDF Core ;).


> It is not possible to have the answers to Tests A and Test D both be 
> yes.  Either the A's can be yes or D can be yes, but not 
> both.  We have to 
> decide which of these is the most important to have.

I don't understand why these are mutually exclusive. Is it not possible
to declare a property whose range is both literals and XML Schema
integers?


> To end then, please send a message to www-rdf-comments@w3.org 
> (by 26 July 
> 2002) indicating whether you believe its more important to 
> have the answer 
> to test cases A be yes, or test case D be yes:
> 
>    Test A:
> 
>    <Jenny> <ageInYears> "10" .
>    <John>  <ageInYears> "10" .
> 
> Test D:
> 
>    <Jenny>      <ageInYears> "10" .
>    <ageInYears> <rdfs:range> <xsdr:decimal> .
> 
>    <John>  <ageInYears>      _:a .
>    _:a     <xsdr:decimal>   "10" .
> 

If you really need answers, test case D is "yes" (assuming "10" is a
kosher way of writing 10 in XML Schema) and test case A is
"implementation specific". But respectfully I think the issue is
ill-posed and needs to be kicked back to the wg, so I'll wait before I
post to rdf-comments (though I'm guessing the wg really would like to
close this one and move on :). 

Bill de hÓra

..
Propylon
www.propylon.com 

 
Received on Saturday, 13 July 2002 12:00:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:54 GMT