W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > June 2005

Re: Accessing Graph Names

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Fri, 17 Jun 2005 16:36:37 +0100
Message-ID: <42B2EE05.7020502@hp.com>
To: Olivier Corby <Olivier.Corby@sophia.inria.fr>
CC: public-rdf-dawg-comments@w3.org

Olivier Corby wrote:
> I have a remark concerning the GRAPH statement when there is another 
> GRAPH  within its scope. For example :
> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> SELECT ?src ?bobNick
>    {
>      GRAPH ?src
>      { ?x foaf:mbox <mailto:bob@work.example> .
>        GRAPH ?src2 {
>          ?x foaf:nick ?bobNick
>        }
>      }
>    }
> One may understand that the internal GRAPH ?src2 can match any named 
> graph, possibly different from the one that is matched by the outer 
> GRAPH ?src.
> If this is the case, the text in section 8.1 Accessing Graph Labels
> at http://www.w3.org/TR/rdf-sparql-query/#accessByLabel is ambiguous :
> "The pattern part of the GRAPH only matched triples in a single named 
> graph ..."
> The 8.5 Definition for GRAPH is also ambiguous for the same reason.
> Best regards,
> Olivier Corby


Thanks for noting that.  I have cleared it up as part of a change that defines 
matching a pattern on a dataset.  I have removed the text "The pattern part..." 
and the definition of matching GRAPH has been moved earlier.


==== Definition: RDF Dataset

An RDF dataset is a set:
      { G, (<u1>, G1), (<u2>, G2), . . . (<un>, Gn) }
where G and each Gi are graphs, and each <ui> is an IRI. Each <ui> is distinct.

G is called the default graph. (<u1>, Gi) are called named graphs.

There may be no named graphs.

A graph pattern P, where P is not an RDF Dataset Graph Pattern, matches an RDF 
dataset DS with solution S if P matches G (the default graph of DS) with solution S.

==== Definition: RDF Dataset Graph Pattern

If D is a dataset {G, (<u1> G1), ...}, and P is a graph pattern then S is a 
pattern solution of GRAPH(g, P) if either of:

    1. g is an IRI where g = <ui> for some i, and S is pattern solution of P on 
dataset {Gi, (<u1> G1), ...}
    2. g is a variable, S maps the variable g to <ui> and S is a pattern 
solution of P on {Gi, (<u1> G1), ...}
Received on Friday, 17 June 2005 15:40:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:06 UTC