UNION example

Hi all,
   I was just working my way through the SPARQL CR, and noticed a  
slight annoyance in <http://www.w3.org/TR/rdf-sparql-query/#unionOp>.

   The example data only specifies titles:

===================================================
@prefix dc10:  <http://purl.org/dc/elements/1.0/> .
@prefix dc11:  <http://purl.org/dc/elements/1.1/> .

_:a  dc10:title     "SPARQL Query Language Tutorial" .

_:b  dc11:title     "SPARQL Protocol Tutorial" .

_:c  dc10:title     "SPARQL" .
_:c  dc11:title     "SPARQL (updated)" .
===================================================

   but the second query references creators:


===================================================
PREFIX dc10:  <http://purl.org/dc/elements/1.1/>
PREFIX dc11:  <http://purl.org/dc/elements/1.0/>

SELECT ?title ?author
WHERE  { { ?book dc10:title ?title .  ?book dc10:creator ?author }
          UNION
          { ?book dc11:title ?title .  ?book dc11:creator ?author }
        }
===================================================

   Running this query against the data in the document will not  
produce the stated results:

author         |  title
====================================================
"Alice"        |  "SPARQL Protocol Tutorial"
----------------------------------------------------
"Bob"          |  "SPARQL Query Language Tutorial"
====================================================


   I suggest adding the triples

_:b  dc11:creator  "Alice" .
_:a  dc10:creator  "Bob" .

   to the example data, if only for clarity's sake.

-R

Received on Tuesday, 9 May 2006 02:15:33 UTC