W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2010

Property Paths Update (negated property classes)

From: Andy Seaborne <andy.seaborne@talis.com>
Date: Tue, 16 Mar 2010 10:16:34 +0000
Message-ID: <4B9F5A82.8090002@talis.com>
To: Lee Feigenbaum <lee@thefigtrees.net>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>
This is Doug Reid's suggestion of:

?x !(rdf:type|^rdf:type) ?y

or find all connections between ?x and ?y that are not via rdf:type, in 
either direction.  This should extend to longer paths.

?x !(rdf:type|^rdf:type)* ?y

# Added extra () for clarity of precedence.
# ! binds tighter than * so it's not needed
?x (!(rdf:type|^rdf:type))* ?y


The case of

?x !(rdf:type|rdfs:label) ?y

without use of ^ works quite easily.  I am wondering about the need for 
reversed properties

A safe course of action would be to allow the case of forward negated 
sets (^ can be applied outside the pattern).  It is quite useful to 
match all but know unwanted properties.

Some cases of "(^)" can be written in other forms (to get semantically 
equivalent results - not exactly the same e.g. ?x/:a ?y/:b and ?x/:b 
?y/:a) but I haven't discovered whether this covers all cases or not.

	Andy
Received on Tuesday, 16 March 2010 10:17:29 GMT

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