Re: Some comments on SPARQL 1.1. Update

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" ?

> 
> 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.

Not sure I understand properly - but should be clearer when I get a sense of what the overall thing means here.

> 
> Also a space has slipped into ":: =" on the first line.

Fixed

> 
> [[
> 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.

I think that remains from a previous definition of the template forms - I've removed that.

> 
> 
> 
> ----
> 
> 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"

> 
> 2/ What happens about bNodes?

Skipping as you answered it in the other email.

> 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"?

My understanding here is that it means "modify_template".
But that may change to "template" based on your 1st comment.

Alex.

> 
> 	Andy
> 
> 

--
Dr. Alexandre Passant
Digital Enterprise Research Institute
National University of Ireland, Galway
:me owl:sameAs <http://apassant.net/alex> .

Received on Monday, 30 August 2010 10:55:16 UTC