- From: Steve Harris <steve.harris@garlik.com>
- Date: Wed, 3 Mar 2010 16:41:21 +0000
- To: Ivan Herman <ivan@w3.org>
- Cc: Lee Feigenbaum <lee@thefigtrees.net>, SPARQL Working Group <public-rdf-dawg@w3.org>
On 3 Mar 2010, at 14:23, Ivan Herman wrote: > > On 2010-3-3 15:02 , Steve Harris wrote: >> On 3 Mar 2010, at 12:26, Ivan Herman wrote: >> ... >>>> == My Opinion == >>>> >>>> While I'm sympathetic to Sandro's use case, I'm frightened of the >>>> fact >>>> that: >>>> >>>> DELETE { _:b1 :p :o } WHERE { } >>>> and >>>> DELETE { ?b1 :p :o } WHERE { } >>>> >>>> do dramatically different things. Because of this, I'd rather we >>>> go with >>>> the first proposal and prohibit blank nodes in the DELETE template >>>> entirely. >>> >>> I think Sandro's use case is important. Eg, this is the only way >>> we can >>> manipulate, via SPARQL UPDATE, RDF graphs encoding OWL constructs >>> or, if >>> Sandro's RIF-in-RDF encoding is done, RIF rules. With entailment >>> regimes >>> around the corner, I think this is important. (And yes, as you >>> say, the >>> restriction on non-named blank nodes is difficult to justify.) >> >> One possibility, which I shied away from mentioning before because >> it's >> probably a hornets nest, is to change the definition of (0 1 2) to >> produce non-*-projected variables, instead of bNodes. I think this >> will >> be compatible with the semantics of SPARQL 1.0, but wouldn't swear >> to it. >> >> This means that DELETE WHERE { :x :p (0 1 2) } would expand to >> something >> like: >> >> DELETE { >> :x :p ?tmp3 . >> ?tmp1 rdf:first 2 . >> ?tmp1 rdf:rest rdf:nil . >> ?tmp2 rdf:first 1 . >> ?tmp2 rdf:rest ?tmp1 . >> ?tmp3 rdf:first 0 . >> ?tmp3 rdf:rest ?tmp2 . >> } >> WHERE { >> :x :p ?tmp3 . >> ?tmp1 rdf:first 2 . >> ?tmp1 rdf:rest rdf:nil . >> ?tmp2 rdf:first 1 . >> ?tmp2 rdf:rest ?tmp1 . >> ?tmp3 rdf:first 0 . >> ?tmp3 rdf:rest ?tmp2 . >> } >> >> Which I believe would delete the list. > > yes, that would work but, oh boy!, it is ugly:-) That expansion is equivalent to what the store would do, the user would use the () syntax. >> More complex things like: >> >> DELETE { >> :x :p (0 1 2) . >> } >> WHERE { >> :x :q (3 4 5) . >> } >> >> Aren't going to work, you'd have to write them in full, but I don't >> see >> any way round that. > > But what does it mean "writing them in full"? The other alternative of > Lee is to prohibit blank nodes in the DELETE template, ie, one cannot > have a list. I think it can, just not expressed using SPARQL "bNodes". Writing out in full, is like the machine conversion above, I agree it's not very user-friendly. - Steve -- Steve Harris, Garlik Limited 2 Sheen Road, Richmond, TW9 1AE, UK +44 20 8973 2465 http://www.garlik.com/ Registered in England and Wales 535 7233 VAT # 849 0517 11 Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Wednesday, 3 March 2010 16:41:51 UTC