W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2011

Scope, BGPs and BIND

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Sat, 15 Oct 2011 19:56:23 +0100
Message-ID: <4E99D757.3040309@epimorphics.com>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
Axel,

The variable scope rules don't quite work:

They seem to treat these two forms the same

1/ { ?s ?p ?o . BIND(57 AS ?o) }
2/ { { ?s ?p ?o } . BIND(57 AS ?o) }

(1) is supposed to be illegal, ditto { BIND(57 AS ?o) ?s ?p ?o .  }
(2) is supposed to be legal
     It's a join of the result of BGP and the BIND applied to the empty 
group. i.e.

join({ ?s ?p ?o },  BIND(57 AS ?o))


Currently they both seem to get treated the same by the rule

   Group { P1 P2 ... }	
   v is in-scope if in-scope in one or more of P1, P2, ...

because BIND isn't connected to BGPs in anyway.

One possible solution is putting BIND into BGPs, (see text in 10.1) The 
group rule then stays the same.  (This would also reflect the group 
discussions as I remember them).

In the examples above we then have:
1 ==> one BGP with a BIND
2 ==> a sub group element, an empty triples BGP with a BIND

There may be other ways to do this.

The grammar notes and in text in 10.1 (BIND "ends any basic graph 
pattern") then need revising.

	Andy

(kasei - this is the outcome of following up on your IRC question - 
thanks for finding it.)
Received on Saturday, 15 October 2011 18:56:58 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:46 GMT