W3C home > Mailing lists > Public > public-sparql-dev@w3.org > April to June 2007

question on UNION

From: Paul Hermans <paul@proxml.be>
Date: Mon, 4 Jun 2007 22:44:20 +0200
To: public-sparql-dev@w3.org
Message-ID: <466479A4.2000407@proxml.be>
Given

PREFIX pcce: <http://www.pcce.be/egb/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT ?property ?object ?value

This works
WHERE
{?subject ?property ?object.
?property a owl:ObjectProperty.
?object rdfs:label ?value}

This works also
WHERE {
{?subject ?property ?object.
?property a owl:DataProperty}

But the union only returns object properties (everything before the 
union) in this case

WHERE {
{?subject ?property ?object.
?property a owl:ObjectProperty.
?object rdfs:label ?value}
UNION
{?subject ?property ?object.
?property a owl:DataProperty} }


And only data properties (before the union) in this case

WHERE {
{?subject ?property ?object.
?property a owl:DataProperty}
UNION
{?subject ?property ?object.
?property a owl:ObjectProperty.
?object rdfs:label ?value} }


While I would like to have both.

What am I missing?
Received on Monday, 4 June 2007 22:17:13 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:15:49 UTC