W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2011

DELETE templates and blank nodes.

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Thu, 03 Mar 2011 15:35:54 +0000
Message-ID: <4D6FB55A.4010509@epimorphics.com>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
What are people's current thoughts about bnodes and DELETE templates?

The only UC seems to be deleting fixed length lists.  Are there any others?

DELETE { ?x :p (1 2 3) }
WHERE { ..find ?x .. }

rather than something like (this should works on arbitrary length lists).

     { ?z rdf:first ?head ; rdf:rest ?tail . }
       .. find ?x ..
       ?x :p ?list .
       ?list rdf:rest* ?z .
       ?z rdf:first ?head ;
          rdf:rest ?tail .
       } ;

# Delete the triples that connect the lists.
DELETE WHERE { ?x :p ?y . }

Not ideal, especially as it does not combine easily,
DELETE { ?x :p (1 2 3) .
          ?x rdf:type :XType . }
WHERE { ..find ?x .. }

so there is a risk "find ?x" will need to be repeated.

My preference is currently to make a syntax restriction that bnodes 
can't be in DELETE templates (ditto DELETE WHERE) so a future WG can 
relax that and decide.

"Option4: is to forbid bnodes in DELETE"
from the last telecon.

where "forbid" is make it a syntax error, done by adding an addition 
note to the grammar, rather than making the grammar have the productions 
for a triple block without bnode possibilities.  This is how INSERT DATA 
vs INSERT is done.

==== Strawpoll summaries:

The strawpool this time and last time hasn't been conclusive:

Option 1: Bnode match all resources in the graph (essentially rewriting 
1 in the mails)

Option 2 : bnodes match whatever they match if treated as 
"modify_template copied to body"

Option 3: treat bnodes as in CONSTRUCT/INSERT, i.e. as new bnodes... 
would mean they don't match anything.

Option 4:is to forbid bnodes in DELETE

Telecon: March 1:

[bglimm] 3 or 4
[pgearon] option 4 (followed by 3)
[kasei] 0
[sandro] (sorry, undecided.)
[AndyS] no opinion - need to see details.
[OlivierCorby] don't know yet
[AxelPolleres]  prefer 1 over 2 , but can live with 3/4

and the time before: Telecon Feb 22:

STRAWPOLL: option 1, 2, or 3? ←

<pgearon> 3
<NickH> 3
<bglimm> undecided
<kasei> 0
<sandro> undecided
<MattPerry> 0
<cbuilara> 0
<AxelPolleres> 1 or2 (but can live with 3)

Received on Thursday, 3 March 2011 15:36:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:03 UTC