Re: Review of SPARQL 1.1. Update editors' draft

On Tue, May 18, 2010 at 6:44 AM, Andy Seaborne <andy.seaborne@talis.com> wrote:
>
>
> On 16/05/2010 2:53 AM, Lee Feigenbaum wrote:
>>
>> * 4.1.3/4.1.4/4.1.5. I think this might be clearer if 4.1.3 made DELETE
>> and INSERT optional, and then 4.1.4 and 4.1.5 _only_ presented and
>> talked about the shortcut forms.
>
> I suggest that DELETE WHERE is treated separately as well.

I've done this now.

> In design, DELETE WHERE is like DELETE DATA except it allows variables and
> treats bNodes as wildcards.
>
> It has a special syntax: the doc currently says:
>
> [ WITH <uri> ]
> DELETE [ { modify_template [ modify_template ]* } ]
> [ USING [NAMED] <uri> ]*
> WHERE GroupGraphPattern
>
> but
>
> 1/ DELETE WHERE takes a template for the WHERE part, not a general
> GroupGraphPattern.
>
> Only the text spells this out:
>
> """
> If the template for modification is not present, then the GroupGraphPattern
> in the WHERE clause is also treated as the template for deletion. If this
> shortened form is used, then the GroupGraphPattern must be simple enough to
> also form a valid template for deletion.
> """
>
> I suggest that the grammar part be right as part of making DELETE WHERE it's
> own section.
>
> DELETE WHERE template
>
> template ::= { modify_template [ modify_template ]* }

Done.

> 2/ Does DELETE WHERE allow USING? I don't think it should and I'm not sure
> what it means if it does.
>
> USING only applies to pattern matching but in DELETE WHERE the template
> pattern performs two functions, matching and removal.

No, it doesn't make sense. The idea is to delete statements that you
find. USING allows you to find statements in a different place to
where you want to delete them from. If you need this, then use a
standard DELETE operation.

> 3/ WITH and DELETE WHERE is unnecessary. GRAPH in the template pattern has
> the same effect and is clearer.

I like WITH over GRAPH, but I recall that there is broad agreement
over using GRAPH in simpler cases like this, so I'll do it as you
suggest.

> 4/ Blank nodes
>
> """
> The pattern in WHERE is matched against the graph store analogously to
> SPARQL - Query. The resulting variable bindings are used to instantiate the
> triple patterns in the DELETE template analogously to CONSTRUCT.
> """
> but aren't blank nodes in template supposed to be wildcards?
>
> http://www.w3.org/2009/sparql/meeting/2010-03-09#Blank_Nodes_in_Delete
>
> [[
> RESOLVED: Blank nodes in DELETE templates act as "wild cards", effectively
> as variables bound to all RDF terms; the same blank node cannot be used in
> the WHERE clause and the template, or in multiple BGPs, SteveH, dcharbon2,
> LeeF abstaining
> ]]
>
> Revision 1.37 log says "Added comment allowing anonymous blank nodes in
> short-form delete"
>
> but I can't find any text any more.

It went in, and then came back out.

I've heard both points of view and have no idea where we are now. Do
we allow blank nodes in these things or not?

> ----
>
> I noticed:
>
> "If the GroupGraphPattern specifies a GRAPH then this will be the graph
> affected.  Otherwise, the operation will be applied to the graph specified
> in the WITH clause, if one was specified, or the default graph otherwise."

<snip/>

This text has changed a lot now that WITH has been dropped and
modify_template is being used instead of GroupGraphPattern. Please let
me know if it needs further improvement.

Regards,
Paul Gearon

Received on Tuesday, 18 May 2010 21:35:28 UTC