- From: Andy Seaborne <andy.seaborne@epimorphics.com>
- Date: Fri, 27 Aug 2010 11:58:44 +0100
- To: SPARQL Working Group <public-rdf-dawg@w3.org>
I'm currently implementing the details of SPARQL Update so details matter.
These comments will probably be addressed in the formal section of the
SPARQL 1.1 Update document which is where I'd go for exact definitions
but for now some comments on the current text that I'm not clear about:
----
4.1.3
http://www.w3.org/2009/sparql/docs/update-1.1/Overview.xml#t413
[[
The modify_template has the following form:
modify_template :: = ConstructTriples | graph_template
graph_template ::= GRAPH VarOrIRIRef { ConstructTriples }
]]
Not quite right? modify_template is defined two ways, as the overall
thing and as single step of "ConstructTriples | graph_template"
The grammar currently has:
[42] QuadTemplate ::= '{' Quads '}'
but that naming isn't very good (is a quad the concrete thing or
+variables?)
Maybe better to call the whole thing a "template" (it's used in that
sense in 'the DELETE template' later on) or call the whole thing a
"modify_template". It would be clearer to "modify_template" as
"template_block" or something that emphasises it a component of the
overall template.
Also a space has slipped into ":: =" on the first line.
[[
The /template/ and /pattern/ forms are as defined in ...
]]
Italics as per doc.
Neither term is used in this section but this reads as some kind of
definition.
----
4.1.6 DELETE WHERE
http://www.w3.org/2009/sparql/docs/update-1.1/Overview.xml#t416
[[
The DELETE WHERE operation is similar to the DELETE/INSERT operation
where the triples matched by the WHERE clause will be the triples deleted.
]]
1/ Triples are not matched by a WHERE clause
- it yields a sequence of query solutions,
templating generates triples
- it matches graphs+triples or quads, not plain triples
2/ What happens about bNodes?
I can't find comments mentioned by the CVS log. What did we decide?
[[
Revision 1.37 2010/03/16 18:27:25 pgearon
Added comment allowing anonymous blank nodes in short-form delete
Revision 1.36 2010/03/16 05:20:05 pgearon
Added a comment about not using blank nodes in the short-form DELETE
operation
]]
The relevant part is:
[[
The modify_template is used both as a GroupGraphPattern and as the
template for deletion. The form for modify_template is described in
DELETE/INSERT.
]]
so the template is used as a GroupGraphPattern (bNodes are
nondistinguished variables) then as CONSTRUCT template (bNodes are
uniquely instantiated).
For now, I'm treating them as variables when matching and template blank
nodes for the delete i.e. exactly as:
DELETE WHERE X === DELETE X WHERE X
This may be helpful, or it may not, as the net effect is that any triple
with a blank node in the syntax will not cause a removal. There are
some potentially clever uses for that for finding stuff and deleting
some of it but that's the domain of the full DELETE form.
3/
[[
If any modify_template specifies a GRAPH then this will be the graph
that that template is matched on, and also the graph from which any
matching triples will be removed. Any templates without a GRAPH
statement will be applied to the default graph.
]]
I know what it intends to mean by the use of "template" but doesn't it
mean "ConstructTriples"?
Andy
Received on Friday, 27 August 2010 10:59:23 UTC