question on UNION

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