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

Here is a contrived example trying to find when some person has a startTime after other people (I did say it was contrived :-)). First with sub-query and then with SERVICE:

select distinct * {
  ?person a ex:Person .
  ?person ex:startTime ?time1 .

  { select ?otherPerson {
    ?otherPerson a ex:Person .
    ?otherPerson ex:startTime ?time2 .
    FILTER (?time2 > ?time1)
  } }
}

select distinct * {
  ?person a ex:Person .
  ?person ex:startTime ?time1 .

  service <http://example.com/foo> {
    ?otherPerson a ex:Person .
    ?otherPerson ex:startTime ?time2 .
    FILTER (?time2 > ?time1)
  }
}

My belief is that both of these will correctly return no results because `?time1` is not bound in either the sub-query or the service call and so the filter will uniformly fail. 

Correct?

thanks,

--
Gary Warren King, 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 17:54:56 UTC