W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2010

Re: Blank node and nested queries

From: Lee Feigenbaum <lee@thefigtrees.net>
Date: Mon, 19 Apr 2010 09:31:40 -0400
Message-ID: <4BCC5B3C.2090204@thefigtrees.net>
To: Andy Seaborne <andy.seaborne@talis.com>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>
I think this is reasonable.

Lee

On 4/19/2010 4:19 AM, Andy Seaborne wrote:
> In SPARQL 1.0 the following query is illegal because the label "a" is
> used twice in different BGPs.
>
> PREFIX : <http://example/>
>
> SELECT *
> {
> _:a :p ?x .
> OPTIONAL { _:a :w ?y }
> }
>
> We have a choice in SPARQL 1.1 Query as to whether this scoping rule
> applies to the query or the SELECT statement.
>
> In SPARQL 1.1, we now have nested SELECTs. It is convenient to be able
> to paste one SELECT, having got it working, into another query. Having
> to check labels stops a simple cut&paste of we decide the scope is the
> query.
>
> PREFIX : <http://example/>
>
> SELECT *
> {
> _:a :p ?x .
> { SELECT * { _:a :p ?y } }
> }
>
> I suggest that we clarify blank node scoping rule to apply to one SELECT
> statement, not the whole query, making the SPARQL 1.1 query above legal.
>
> Analogous things happen with unprojected variables:
>
> PREFIX : <http://example/>
>
> SELECT *
> {
> :a :p ?x .
> { SELECT (COUNT(*) AS ?C) { :a :q ?x } }
> }
>
> The two ?x are unrelated - they never meet at an operation that causes a
> join over them.
>
> CONSTRUCTs already allow labels to be used twice.
>
> CONSTRUCT { _:a :p ?x } WHERE { _:a :q ?x }
>
> Andy
>
>
Received on Monday, 19 April 2010 13:32:18 GMT

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