W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2005

Re: writing a triple filter?

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Fri, 05 Aug 2005 22:31:28 +0100
Message-ID: <42F3DAB0.20907@hp.com>
To: kendall@monkeyfist.com
Cc: DAWG Mailing List <public-rdf-dawg@w3.org>



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 GMT

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