W3C home > Mailing lists > Public > public-sparql-dev@w3.org > October to December 2015

Re: quick sanity check question on sub-query, service and variable scoping

From: Gary King <gwking@metabang.com>
Date: Mon, 19 Oct 2015 15:15:12 -0400
Cc: public-sparql-dev@w3.org
Message-Id: <927D96F1-CB4C-41AA-BC7F-F3764778CEAC@metabang.com>
To: Miguel <miguel.ceriani@gmail.com>
Hi Miguel,

> SERVICE blocks and sub-queries have different semantics relating to the variable scope.

— snip —

At first I thought your answer made sense but further reflection (and Gregory Williams) answer brings me back to my initial impression.

Indeed, even in a query like:

select * {
  # A
  {
   values ?x { 1 2 3 }
  }
 # B
  {
    values ?y { 1 2 3 }
      filter( ?y > ?x)
  }
}

A and B should be evaluated independently and ?x is not bound in the scope of B so the query should return no results.

--
Gary Warren King, metabang.com <http://metabang.com/> 
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM * gwking on twitter
Received on Monday, 19 October 2015 19:15:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 19 October 2015 19:15:42 UTC