Blank node treatment is unclear

Hello

Following on from a chat on #swig I have a test case for discussion
purposes. See attached file, or
http://cantorva.com/2006NS/Section0214BlankNodesTestCase.rdf .

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 attached RDF/XML file for the differences I estimate
this will cause in the result sets. Essentially, given the attached
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?

Finally, thanks to all for the all of great work going into SPARQL.

Simon Gibbs
Cantorva

Received on Wednesday, 3 May 2006 19:30:54 UTC