Re: SPARQL Update / editorial

On 11/01/11 16:33, Steve Harris wrote:
> On 2011-01-11, at 14:48, Andy Seaborne wrote:
>
>> Editorial: so it does not get lost:
>>
>> These are all the same operation, in different guises:
>>
>> 3.1.3 DELETE/INSERT
>>
>> [ WITH<uri>  ]
>> DELETE { modify_template [ modify_template ]* }
>> INSERT { modify_template [ modify_template ]* }
>> [ USING [NAMED]<uri>  ]*
>> [ WHERE ] GroupGraphPattern
>>
>> The word WHERE is optional, GroupGraphPattern is not.
>
> It makes me very uncomfortable that

Note - I was pointing out the inconsistency in the text.

>
> DELETE {}
> INSERT
> {
>    <a>  <b>  <c>
> }
> {
>    <d>  <e>  <f>
> }
>
> Has a radically different meaning from
>
> DELETE {}
> INSERT {
> {
>    <a>  <b>  <c>
> }
> {
>    <d>  <e>  <f>
> }
> }

Can't have {{}} in a template but I know what you mean.

> Would prefer
>
> [ WHERE GroupGraphPattern ]

Completely patternless gets confusing with INSERT DATA because of 
variables in the pattern with INSERT { ?s ?p ?o } which might read as 
implciitly setting ?s ?p ?o.

The WHERE is currently mandatory in the grammar.  This is based on my 
recollection of the discussions at the time; that included the 
confusingness of some forms with WHERE omitted (IIRC).

I don't think anyone is proposing the text as being the right way.

Historically, I think it's legacy going back to the submission, whose 
own legacy was that with no INSERT DATA, basic data was

INSERT { <s> <p> "o" }

and WHERE .. is optional.  On adding INSERT DATA that grammar 
(submission) kept the optionalness for compatibility.  No longer an issue.

See
http://www.w3.org/2009/sparql/docs/tests/data-sparql11/syntax-update-1/

Not sure if this is comprehensive enough.

But "accepting the grammar" should include accepting the tests.

	Andy

Received on Tuesday, 11 January 2011 17:10:49 UTC