- From: Andy Seaborne <andy.seaborne@epimorphics.com>
- Date: Mon, 30 Aug 2010 14:04:04 +0100
- To: Alexandre Passant <alexandre.passant@deri.org>
- CC: SPARQL Working Group <public-rdf-dawg@w3.org>
Hi Alex, On 30/08/10 11:54, Alexandre Passant wrote: > Hi, > > On 27 Aug 2010, at 11:58, Andy Seaborne wrote: > >> > 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" > What do you mean by "the overall thing" ? That's the problem, it has no name :-) A "modify_template" is a single unit that is combined to produce "{ modify_template [ modify_template ]* }" What's the correct name of "{ modify_template [ modify_template ]* }" - I don't see one but this combined unit is being used later. BTW - Why is it required to always have at least one modify_template? DELETE {} or INSERT {} may be no-ops but when syntax is being generated by tools, it's easier if the zero-base case is legal. >> > 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 > Would you be ok with "where the triples and their corresponding > graphs identified by the WHERE clause will be the triples deleted" I think it going to need to say something about the two cases of ConstructTriples and graph_template. "where any triples matching a construct template are deleted from the default graph and any triples matching a graph_template are deleted from that graph." This may be something for the formal section but as I understand the proces for DELETE WHERE we have: 1/ Replace bnodes consistently with variables. 2/ Execute the {} as a graph pattern, noting the whole thing must match. 3/ Take the query solutions resulting and for each instantiate the {} to get quads, or a set of pairs (graph URI, triple). 4/ For each element of the set, delete the triple from the graph it's paired with. That could be done by: 1a/ Replace bnodes consistently with variables. 2a/ execute DELETE {} WHERE {} because (2a) is covered elsewhere. Andy
Received on Monday, 30 August 2010 13:04:41 UTC