next up previous contents
Next: Distinct Up: Body Previous: Optional part   Contents

Negation as failure

By combining option and not Bound it is possible to implement negation as failure and find non existing pattern. For example, find persons who are member of an organization and who have not created a document concerning a topic :

?x rdf:type c:Person
?x c:isMemberOf ?org
option (
?x c:hasCreated ?doc
?doc c:Concern ?topic
)
not ?topic is Bound



Olivier Corby 2005-07-01