Re: SPARQL Query: subqueries

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.

In
http://lists.w3.org/Archives/Public/public-rdf-dawg/2010AprJun/0063.html
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.

 Andy

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