Re: Draft response JB-2

Yes, looks ok to me too.

- Steve

On 2011-03-29, at 09:34, Andy Seaborne wrote:

> Looks OK.
> 
> 	Andy
> 
> On 28/03/11 22:57, Axel Polleres wrote:
>> I'd appreciate if someone could have a look at that draft response...
>> 
>>  http://www.w3.org/2009/sparql/wiki/CommentResponse:JB-2
>> 
>> Thanks,
>> Axel
>> 
>> On 22 Mar 2011, at 13:39, Axel Polleres wrote:
>> 
>>> Hi all,
>>> 
>>> based on Greg's example, I updated the draft response at:
>>> 
>>> http://www.w3.org/2009/sparql/wiki/CommentResponse:JB-2
>>> 
>>> Let me know whether that works for you.
>>> 
>>> Thanks a lot,
>>> Axel
>>> 
>>> On 1 Mar 2011, at 15:23, Gregory Williams wrote:
>>> 
>>>> On Mar 1, 2011, at 10:12 AM, Andy Seaborne wrote:
>>>> 
>>>>> I added the nested FILTER example recently.  This is a different difference as it's based on scoping of variables.
>>>> 
>>>> 
>>>> (Responding to the issue raised in JB-2 as part of ACTION-403.)
>>>> 
>>>> 
>>>> I had posted an example of where MINUS and NOT EXISTS are different to Jeen's weblog (where he posted JB-2 before sending it to the list):
>>>> 
>>>> http://jeenbroekstra.blogspot.com/2011/02/implementing-sparql-11-query-first.html?showComment=1297185762180#c1530706422809325453
>>>> 
>>>> The difference in my example is based on NOT EXISTS relying on the variable substitution that happens during filter function evaluation:
>>>> 
>>>> 
>>>> 
>>>> In this example, the ?n variable isn't bound (isn't in scope) in the MINUS block, and so the FILTER inside the MINUS does something different than FILTER inside the NOT EXISTS block.
>>>> 
>>>> ### Data
>>>> 
>>>> @prefix :<http://example.com/>  .
>>>> 
>>>> :a :p 1 ; :q 1,2 .
>>>> :b :p 3.0 ; :q 4.0, 5.0 .
>>>> 
>>>> ### Query 1: NOT EXISTS
>>>> 
>>>> PREFIX :<http://example.com/>
>>>> SELECT * WHERE {
>>>> 	?a :p ?n
>>>> 	FILTER NOT EXISTS {
>>>> 		?a :q ?m .
>>>> 		FILTER(?n = ?m)
>>>> 	}
>>>> }
>>>> 
>>>> +------------------------+-----+
>>>> | a                      | n   |
>>>> +------------------------+-----+
>>>> |<http://example.com/b>  | 3.0 |
>>>> +------------------------+-----+
>>>> 
>>>> ### Query 2: MINUS
>>>> 
>>>> PREFIX :<http://example.com/>
>>>> SELECT * WHERE {
>>>> 	?a :p ?n
>>>> 	MINUS {
>>>> 		?a :q ?m .
>>>> 		FILTER(?n = ?m)
>>>> 	}
>>>> }
>>>> 
>>>> +------------------------+-----+
>>>> | a                      | n   |
>>>> +------------------------+-----+
>>>> |<http://example.com/a>  | 1   |
>>>> |<http://example.com/b>  | 3.0 |
>>>> +------------------------+-----+
>>>> 
>>>> 
>>>> 
>>>> 
>>>> .greg
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 

-- 
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD

Received on Tuesday, 29 March 2011 08:46:01 UTC