- From: Lee Feigenbaum <feigenbl@us.ibm.com>
- Date: Mon, 26 Jun 2006 09:35:13 -0400
- To: andy.seaborne@hp.com
- Cc: dawg mailing list <public-rdf-dawg@w3.org>
"Seaborne, Andy" <andy.seaborne@hp.com> wrote on 06/26/2006 05:13:26 AM: > > 1/ Nested GRAPH statements > > > > I didn't find any examples or tests that involved nested GRAPH statements, > > but the spec made it pretty clear what should happen and SPARQLer agrees. > > > > ng1.n3: > > > > :s :p :o, :o1 . > > > > ng2:n3: > > > > :s :p :o, :o2 . > > > > query: > > > > SELECT ?o > > FROM NAMED <ng1.n3> > > FROM NAMED <ng2.n3> > > { > > GRAPH <ng1.n3> { > > GRAPH <ng2.n3> { > > :s :p ?o . > > } > > } > > } > > > > results: > > > > ?o/:o > > ?o/:o2 > > > > why? GRAPH takes the given named graph and places it as the default graph > > in the RDF dataset against which the inner graph pattern is matched. So, > > nested graphs basically act as a stack of default-graph contexts for the > > graph patterns that they contain. > > What were you expecting? GRAPH <ng2.n3> makes ng2:n3 the target > graph for the > pattern { :s :p ?o }, which gives the results shown. In stack terms, it is a > stack of names, the active one being the stack front. There's not merging of > graphs The results that I got were exactly what I was expecting. I was only including that case as a potential test case as it's potentially a non-obvious situation which would be good to include in the test suite. > > 2/ using blank nodes for graph parameter > > > Fred has suggested a syntax change that would remove blank nodes from the > graph name slot of GRAPH. I agree that this would be a good change. > > [25] GraphGraphPattern ::= 'GRAPH' VarOrBlankNodeOrIRIref GroupGraphPattern > > becomes > > [25] GraphGraphPattern ::= 'GRAPH' VarOrIRIref GroupGraphPattern > > and > [43] VarOrBlankNodeOrIRIref ::= Var | BlankNode | IRIref > > can be dropped. I would be happy with this change. Lee
Received on Monday, 26 June 2006 13:35:41 UTC