W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2004

Disjunction example

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Mon, 06 Sep 2004 14:02:04 +0100
Message-ID: <413C5FCC.8040802@hp.com>
To: RDF Data Access Working Group <public-rdf-dawg@w3.org>

What are people expecting to happen in disjunction when both sides 
match?  Do people expect a solution with one arm matched and a solution 
with the other arm matched.  This seems to be the clear case for me but 
do people expect one solution if the both arms match?

Examples treating each arm independently:

==== data:
@prefix : <http://example.org/> .

:x :p "p" .
:x :q "q" .

==== query:
PREFIX : <http://example.org/>

SELECT *
WHERE
   { ?x :p ?p }
   OR
   { ?x :q ?q }

==== result:
------------------------------
| x  | p         | q         |
==============================
| :x | "p"       | <<unset>> |
| :x | <<unset>> | "q"       |
------------------------------

What about:
==== query:

PREFIX : <http://example.org/>

SELECT *
WHERE
   { ?x :p ?p . ?x :q ?q .}
   OR
   { ?x :q ?q }

==== result:
------------------------
| x  | p         | q   |
========================
| :x | "p"       | "q" |
| :x | <<unset>> | "q" |
------------------------

(so it is not { ?x :q ?q . OPTIONAL {?x :p ?p} })
Received on Monday, 6 September 2004 13:02:49 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:20 GMT