W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2009

Re: ISSUE-48: Less verbose delete syntax

From: Steve Harris <steve.harris@garlik.com>
Date: Tue, 10 Nov 2009 12:07:50 +0000
Cc: Kjetil Kjernsmo <kjetil@kjernsmo.net>, public-rdf-dawg@w3.org
Message-Id: <2403D62F-BDE7-431F-BF5D-1CFDDFE84012@garlik.com>
To: Andy Seaborne <andy.seaborne@talis.com>
On 10 Nov 2009, at 10:26, Andy Seaborne wrote:
> On 10/11/2009 06:44, Steve Harris wrote:
>> On 9 Nov 2009, at 22:15, Andy Seaborne wrote:
>>> On 09/11/2009 20:27, Steve Harris wrote:ILTERs
>>
>> Well, in any case we still need to allow for
>>
>> DELETE {
>> template
>> }
>> WHERE {
>> pattern
>> OPTIONAL {
>> pattern2
>> }
>> }
>
> That's already in the SPARQL/Update document isn't it?  DELETE with  
> template and pattern.  Template being a BGP-pattern only.  Or are  
> you saying template involves OPTIONAL?

I was just saying that the template has to be able to handle unbound  
variables, but we do than in CONSTRUCT already.

>> CONSTRUCT can do that, so it's well defined.
>
> The template can't involve OPTIONAL in CONSTRUCT as currently defined.

no, but it handles unbound variables.

> The fact that in a template, only individual triples, not patterns,  
> with unbound variables are omitted sometimes does what you want,  
> sometimes doesn't.

Indeed, but we can't really change that now, and my experience of it  
is quite positive.

> In the CONSTRUCT case, you get more triples with the single triple  
> pattern exclusion and more triples in the answer is relatively safe  
> but when used in DELETE that can end up removing more triples, which  
> is not so safe.

No, but as long as it parallels CONSTRUCT people shouldn't be surprised.

> If the template above is supposed to be pattern+pattern2, it can  
> have strange effects for any triple pattern in pattern2 that does  
> not use a variable introduced somewhere in the optional part:
>
> { ?x :p ?v . OPTIONAL { ?x :q ?z . ?x :r 123 } }
>  ==>
> { ?x :p ?v . ?x :q ?z . ?x :r 123 }

Indeed, but if you were testing via CONSTRUCT, this would be apparent.

> and you can end up deleting "?x :r 123" which is otherwise guarded  
> by a match of "?x :q ?z".  Opps.
>
> So we would need an interpretation of the keyword OPTIONAL in  
> templates.

We would, but that wasn't what I was suggesting :)

- Steve

-- 
Steve Harris, CTO, Garlik Limited
2 Sheen Road, Richmond, TW9 1AE, UK
+44(0)20 8973 2465  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, 10 November 2009 12:08:20 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:40 GMT