- From: Andy Seaborne <andy.seaborne@talis.com>
- Date: Tue, 18 May 2010 11:44:43 +0100
- To: SPARQL Working Group <public-rdf-dawg@w3.org>
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.
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 ]* }
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.
3/ WITH and DELETE WHERE is unnecessary. GRAPH in the template pattern
has the same effect and is clearer.
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.
----
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."
Not quite -
A/ Isn't this about the modify_template, not the GroupGraphPattern?
It's the template that controls describing the triples to delete.
B/ what about:
{
?s :p ?o .
GRAPH <g> { ?s :q ?z }
}
both the default graph and graph <g> are affected, not just <g> as the
text implies. The first part is affected by WITH.
C/ There may be 2 or more GRAPH in the pattern.
Andy
Received on Tuesday, 18 May 2010 10:51:28 UTC