- From: Steve Harris <S.W.Harris@ecs.soton.ac.uk>
- Date: Sun, 16 Jan 2005 03:18:15 +0000
- To: RDF Data Access Working Group <public-rdf-dawg@w3.org>
On Sat, Jan 15, 2005 at 08:37:57 +0000, Andy Seaborne wrote: > Steve Harris wrote: > >On Fri, Jan 14, 2005 at 03:38:01PM -0600, Dan Connolly wrote: > > > >>If you have a novel position on an issue, not represented by one of the > >>options or even close, mail the wg with the issue name in the subject > >>and I'll try to add it. > > > > > >For the SOURCE issue I would like what Alberto and I do currently to be > >considered, as in > >http://www.w3.org/2001/sw/DataAccess/tests/#source-query-001 2 3 & 5 > >AFAIK it is the only solution that was arrived at independently by more > >than one working group member, and it represents our development and > >support experience. > > > >The key feature is that the URI used to identify the triples (ie. bound by > >the SOURCE keyword) is not neccesarily the URI that was resolve to > >retreive the grpah, that may be got by following some predicate from the > >SOURCE URI to the actual URI resolved (dc:sounrce in the testcases). > > > >This allows more that one version of a graph identified by the same URI to > >be present in the store at one time, without confusion. > > > >- Steve > > > > This is possible with the mechanism currently in the document. > > rq23 does not prescribe that the URI that names the graph is the URI it is > read from and a predicate can connect the two - it's your choice Use of > FROM or GRAPH is optional - the RDF dataset can be set externally but I > have used them here so that the queries can go in a manifest. OK, that sounds good. > ==== Query 1 : > > PREFIX foaf: <http://xmlns.com/foaf/0.1/> > PREFIX dc: <http://purl.org/dc/elements/1.1/> > > SELECT DISTINCT ?name ?source ?date > > # explicitly name the graphs just for clarity - note internal names > # Manifest format can't express this externally. > > FROM <urn:x-local:details> # The place when provenance info is kept > GRAPH <urn:x-local:graph1> # Allocated when aliceFoaf read in > GRAPH <urn:x-local:graph2> # Allocated when bobFoaf read in > > WHERE SOURCE ?snode (?person foaf:name ?name) > (?snode dc:source ?source) > (?snode dc:date ?date) > > and I get: > > ---------------------------------------------------------------------- > | name | source | date | > ====================================================================== > | "Alice" | <http://example.org/foaf/graph> | "2005-01-10"^^xsd:date | > | "BOB" | <http://example.org/foaf/graph> | "2005-01-10"^^xsd:date | > | "Bob" | <http://example.org/foaf/graph> | "2004-12-06"^^xsd:date | > | "Alice" | <http://example.org/foaf/graph> | "2004-12-06"^^xsd:date | > ---------------------------------------------------------------------- Great, but whats the purpose of the FROM and GRAPH keywords here? Are they to illustrate something I'm missing, or are they neccesary? > ==== Query 2 : > PREFIX foaf: <http://xmlns.com/foaf/0.1/> > PREFIX dc: <http://purl.org/dc/elements/1.1/> > > SELECT DISTINCT ?name ?source > > FROM <urn:x-local:details> > GRAPH <urn:x-local:graph1> > GRAPH <urn:x-local:graph2> > > WHERE SOURCE ?snode (?person foaf:name ?name) > (?snode dc:source ?source) > (?snode dc:date ?date) > > --------------------------------------------- > | name | source | > ============================================= > | "BOB" | <http://example.org/foaf/graph> | > | "Alice" | <http://example.org/foaf/graph> | > | "Bob" | <http://example.org/foaf/graph> | > --------------------------------------------- Ditto. Also, if you read in a graph that has: <owl:Ontology rdf:about=""> ... </owl:Ontology> Does the ... get assertad with urn:x-local:foo, or the resolved URI as its subject? - Steve
Received on Sunday, 16 January 2005 03:18:20 UTC