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

Re: SPARQL Query: subqueries

From: Andy Seaborne <andy.seaborne@talis.com>
Date: Mon, 10 May 2010 16:45:32 +0100
Message-ID: <4BE82A1C.3060902@talis.com>
To: Olivier Corby <Olivier.Corby@sophia.inria.fr>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>

On 10/05/2010 12:53 PM, Olivier Corby wrote:
> I also wonder why "It is an error to reuse variable names both inside
> and outside a subquery when the variable is not projected from the
> subquery."
> Such variables may be local variables with no incidence with the outside
> of the query. In particular, if we build a complex query with copy-paste
> of existing queries, there may be duplicate variable names.

we decided to allow reuse of bNode labels to make copy-paste query 
building work.  Here, it also complicates the fact that "SELECT ?x" 
would fail where "SELECT ?x ?y" is legal for use of inner ?y so a change 
in one part of the query causes an error at a different point.

We should be consistent in style - I'd prefer removing that text and 
allowing variable names to be used inside and outside a subquery.

Received on Monday, 10 May 2010 15:45:34 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:00 UTC