On Wed, 22 Feb 2012 10:28:52 +1300
David Brooks <[email protected]> wrote:

> I would use "DELETE WHERE { ... }" -- see 
> http://www.w3.org/TR/sparql11-update/#deleteInsert.

Hello,

I just tried to to that, with no success.
If I try:

DELETE { <http://subject> <http://pred> ?seq .
         ?seq ?seq_index ?uri .
         ?uri <http://listOf> ?uri2  
   }
WHERE
   <http://subject> <http://pred> ?seq .
   ?seq ?seq_index ?uri
   OPTIONAL { ?uri <listOf> ?uri2 }

With the same model as in my previous message, ?seq, ?seq_index and
sometimes ?uri match blank nodes. I thought these variables would refer to
the original blank nodes, so that they would be removed. But it does not
seem to be the case.

http://www.w3.org/TR/sparql11-update/#deleteInsert states that 
  "Blank nodes are prohibited in a DELETE template, since using a new blank
   node in a DELETE template would lead to nothing being deleted, as a new
   blank node cannot match anything in the Graph Store."

So it seems like it behaves like with the construct template.

So, is it impossible to delete blank nodes with such delete queries ?

Regards,

Maxence

> 
> Regards,
> Dave
> 
> On 22/02/12 12:29 AM, Maxence Guesdon wrote:
> > On Tue, 21 Feb 2012 21:52:48 +1300
> > David Brooks<[email protected]>  wrote:
> >
> >> Hi Maxence,
> > Hello,
> >
> >> Blank nodes are anonymous -- the nodes without labels in a visual graph
> >> of your model.
> >>
> >> In an RDF store these nodes are given identifiers in order to include
> >> the nodes in statements. The actual value of a blank node's identifier
> >> though is local to the graph it is part of. Generating another graph via
> >> a query is very likely to assign different values, and even two
> >> identical queries against the same graph are likely to return different
> >> blank node identifiers.
> > Thanks for your answer. So that's a feature.
> >
> > The reason why I encountered this problem is that I wanted to remove a part
> > of my model. So this query was supposed to return the statements to remove
> > from my model.
> >
> > I have to do it another way. For information, since I have no experience
> > yet of performing such an operation, what is your favorite way of removing
> > part of your model when it contains blank nodes ? I mean, the less painful
> > one, of cource :-)
> >
> > Regards,
> >
> > Maxence


-- 
Maxence Guesdon

_______________________________________________
redland-dev mailing list
[email protected]
http://lists.librdf.org/mailman/listinfo/redland-dev

Reply via email to