- From: Seaborne, Andy <andy.seaborne@hp.com>
- Date: Thu, 01 Jun 2006 10:40:09 +0100
- To: Simon Gibbs <simon.gibbs@cantorva.com>
- CC: public-rdf-dawg-comments@w3.org
Simon Gibbs wrote: > Hello > > Following on from a chat on #swig I have a test case for discussion > purposes. See http://cantorva.com/2006NS/Section0214BlankNodesTestCase.rdf > for test data and commentry. > > I've implemented a SPARQL engine which implements blank nodes per > section 2.8.3 which gives blank node labels query scope. Section 2.5.4 > seems to contradict this giving labels a scope specific to the basic > graph pattern. One contributor on #swig understood 2.5.4 to be the case. > > See notes in the linked RDF/XML file for the differences I estimate > this will cause in the result sets. Essentially, given the linked > data, ?category is bound to a value less frequently under the regime > given by 2.8.3 since all patterns must match the same subject node > rather than matching only on the variable ?mailbox. > > PREFIX ex: <http://example.org/exNS/> > SELECT ?mailbox ?category > WHERE > { > _:a ex:sender ?mailbox ; > ex:recipient <mailto:alice@example.com> . > OPTIONAL { > _:a ex:sender ?mailbox; > ex:category ?category . > } > } > > The wording in the spec that seems to be at the root of this confusion is: > > 2.5.4: "the scope of the blank node label being the basic graph pattern" > 2.8.3: "Blank nodes have labels which are scoped to the query." > > both from http://www.w3.org/TR/rdf-sparql-query/ > > My questions are, is this a conflict or am I missing something? If so, > what is that? Otherwise, can the WG please clarify the conflict? No - you're not missing anything. Blank node labels are scoped to the basic graph pattern as per 2.5.4. 2.8.3 is wrong. This clarification/change happened very late in the working group discussions and 2.8.3 didn't get changed. I have corrected it in the editors' working draft. http://www.w3.org/2001/sw/DataAccess/rq23/#blankNodes I also changed the title of 2.8.3 to "Blank Nodes in Queries" and adjusted the TOC. So, your example query isn't going to treat _:a as the same in the fixed and optional basic graph patterns - that would need a "?" variable. Thanks for the comment, Andy > > Finally, thanks to all for the all of great work going into SPARQL. > > Simon Gibbs > Cantorva > > PS please forgive possible duplicate
Received on Thursday, 1 June 2006 09:40:29 UTC