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

Re: how does existing RDF software handle this datatypes test?

From: Geoff Chappell <geoff@sover.net>
Date: Wed, 30 Jan 2002 16:49:08 -0500
Message-ID: <00bc01c1a9d7$f23e8190$0400a8c0@GSC866>
To: "Dan Connolly" <connolly@w3.org>, "RDF Interest" <www-rdf-interest@w3.org>, "RDF Logic" <www-rdf-logic@w3.org>
In rdfql:

Query:
================================================================
namespace [http://purl.org/dc/elements/1.1/] is dc
namespace [http://example/vocab#] is ex

connect
[inet?url=http://www.w3.org/2000/10/swap/test/dt10-premise.rdf&parsetype=rdf
] as ds

select ?b using ds where {[dc:title] ?a ?x} and {[ex:age] ?b ?x}



Results:
===========================================================
b
-----------------------------------------------------------
[http://www.w3.org/2000/10/swap/test/dt10-premise.rdf#mary]

command returned 1 records





Of course, things could be changed to support non-tidy literals and then I
suppose you'd have to do something like:

select ?b using #s where {[dc:title] ?a ?x} and {[ex:age] ?b ?y} and
labelof(?x) = labelof(?y)

...similar to what you'd need to if you wanted to if you wanted to bind case
insensitively today.

or else have some form of identity rules like:

infer {[xx:isSameAs] ?a ?b} from {[rdf:type] ?a ?t} and {[rdf:type] ?b ?t}
and ?t<>[rdfs:Literal] and labelof(?a)=labelof(?b)

infer {?p ?s ?a} from {?p ?s ?b} and {[xxx:isSameAs] ?a ?b}

then:

select ?b using ds where {[dc:title] ?a ?x} and {[ex:age] ?b ?y}

would return a value if the range of dc:title and ex:age happened to be the
same.

--Geoff Chappell






----- Original Message -----
From: "Dan Connolly" <connolly@w3.org>
To: "RDF Interest" <www-rdf-interest@w3.org>; "RDF Logic"
<www-rdf-logic@w3.org>
Sent: Wednesday, January 30, 2002 12:03 PM
Subject: how does existing RDF software handle this datatypes test?


> There's a lot to read about TDL and S,
> http://lists.w3.org/Archives/Public/www-rdf-interest/2002Jan/0164.html
> but I think it can be summarized with the following
> test case. If you develop (or use) any RDF software,
> please try it out on this test case and report
> your findings.
>
> Consider this RDF document:
>
> <rdf:RDF
> xmlns="file:/home/connolly/w3ccvs/WWW/2000/10/swap/test/dt10-premise.n3#"
>     xmlns:dc="http://purl.org/dc/elements/1.1/"
>     xmlns:ex="http://example/vocab#"
>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
>
>     <rdf:Description>
>         <rdf:type rdf:resource="#Film"/>
>         <dc:title>10</dc:title>
>     </rdf:Description>
>
>     <rdf:Description rdf:about="#mary">
>         <ex:age>10</ex:age>
>     </rdf:Description>
> </rdf:RDF>
>
> If you read RDF/N3, and you don't mind some ommitted
> prefix declarations, you might find this short version
> easier to grok:
>   _:f rdf:type <#Film> .
>   _:f dc:title "10" .
>   <#mary> ex:age "10" .
>
> Suppose I asked you:
> does that document say that
> there's something with a dc:title?
> I hope you'd say: yes, of course.
> Now... suppose I ask:
> whatever that title is, let's call it X.
> Does that document also say that there's
> something with ex:age of that same X?
>
> If you have any sort of RDF API or query language or
> any sort of software in which this question can be posed,
> would you please ask your implementation and tell
> us its answer right now?
>
> [[for those of you that have followed the (unapproved)
> entailment test work,
>   http://www.w3.org/2000/10/rdf-tests/rdfcore/#not_approved
> you can use this as an entailment test:
> premise:
>   http://www.w3.org/2000/10/swap/test/dt10-premise.rdf
> conclusion:
>   http://www.w3.org/2000/10/swap/test/dt10-conc.nt
>
> If you use cwm, you can use this test-driver:
>   cwm http://www.w3.org/2000/10/swap/test/datatype10.n3 --think
> ]]
>
> The TDL position (as I understand it) is: no...
> That document doesn't say that Mary's age is
> the same as the Film's title. There's probably
> a range constraint on ex:age that says it's
> an integer; not a numeral, but a real integer.
> The film's title is probably a numeral.
> There are certainly interpretations in which
> they denote different things; hence the conclusion
> is not valid.
>
> The S position is: yes, that document says
> mary's age is "10" and the Film's title is "10".
> The conclusion is valid in all interpretations.
> The range of the age property is most likely
> a numeral, not a number. If you want an age
> property whose range is a number, you can have
> that, but it's a distinct property; let's
> say exV:age. and you need to write:
>
> <ex:age rdfdt:decimal="10"/>
>
> where rdfdt:decimal expands to the name we
> choose for the mapping from decimal values
> to decimal literals.
>
> ACKS: Sergey made up this example.
> http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2002Jan/0293.html
> or... hmm... that's not quite the same...
> maybe Brian made up this example. Anyway...
> I got the gist of the test case from
> somebody else.
>
> --
> Dan Connolly, W3C http://www.w3.org/People/Connolly/
>
Received on Wednesday, 30 January 2002 16:48:45 GMT

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