- From: Dan Connolly <connolly@w3.org>
- Date: Mon, 08 Aug 2005 13:28:54 -0500
- To: kendall@monkeyfist.com
- Cc: DAWG Mailing List <public-rdf-dawg@w3.org>
On Fri, 2005-08-05 at 19:42 -0400, Kendall Clark wrote:
> On Fri, Aug 05, 2005 at 05:49:11PM -0400, Kendall Clark wrote:
>
> Argh... I should have said...
>
> > --Query--
> > PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> > PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> > PREFIX myfoaf: <http://clark.dallas.tx.us/kendall/foaf.rdf#>
> >
> > CONSTRUCT { myfoaf:kendall foaf:depiction <http://clark.dallas.tx.us/kendall/kendall.jpg>.
> > myfoaf:kendall foaf:schoolHomepage <http://www.smu.edu/>.
> > ?s ?p ?o.}
> > WHERE { ?s ?p ?o.
> > FILTER( ?s != myfoaf:kendall &&
> > ?p != foaf:knows &&
> > ?o != myfoaf:edd )}
>
> WHERE { ?s ?p ?o.
> FILTER( ?s != myfoaf:kendall &&
> ?p != foaf:knows &&
> ?o != myfoaf:edd)
> FILTER( ?s != myfoaf:edd ) }
>
> But it seems, from a quick look at the grammar, that there can only be one
> FILTER in a WHERE? Is that correct? What's the reason for that restriction,
> if so?
I'm not sure what the syntax rules are, but multiple FILTERs,
i.e. FILTER e1 FILTER 2 would surely mean the same thing as
FILTER e1 && e2, right?
I think what you want is
FILTER ( ! (
?s == myfoaf:kendall && ?p == foaf:knows && ?o == myfoaf:edd ) )
or if there's another triple you want to filter out:
FILTER ( ! (
?s == myfoaf:kendall && ?p == foaf:knows && ?o == myfoaf:edd )
&& ! ( ?s = subj && ?p = pred && ?o = obj ) )
and so on.
> And is this legal instead?
>
> WHERE { ?s ?p ?o.
> FILTER( (?s != myfoaf:kendall || ?s != myfoaf:edd) &&
> ?p != foaf:knows &&
> ?o != myfoaf:edd) }
>
> Cheers,
> Kendall
--
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541 0875 0F91 96DE 6E52 C29E
Received on Monday, 8 August 2005 18:29:02 UTC