Re: writing a triple filter?

Kendall Clark wrote:
> Dogs,
> 
> How do I say, in a CONSTRUCT query, that if there's a triple T in the
> solution set, I don't want it in the output graph? I thought something like
> FILTER fn:not(T), but that doesn't work in the WHERE clause. But that
> doesn't seem to be legal.
> 
> Do we have any functions that operate on triples?
> 
> Cheers, 
> Kendall
> 

You can test for some possibilities in a filter expression by getting hold 
of the subject/predicate/object as three variables.

Exactly how will depend on exactly what you are trying to eliminate but ....

CONSTRUCT { ?s ?p ?o }
WHERE { ?s ?p ?o . FILTER ( ?s != <subj> && ?p != <pred> && ?o != "obj" ) }

does one simple case.

	Andy

Received on Friday, 5 August 2005 21:31:37 UTC