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

FILTER inside FILTER?

From: Birte Glimm <birte.glimm@comlab.ox.ac.uk>
Date: Mon, 1 Nov 2010 16:12:58 +0000
Message-ID: <AANLkTinF2Qo1Q7nqH74fGjOdiFpqwZ8DbcNfvenXDqGg@mail.gmail.com>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
Hi all,
I  was just wondering whether I can have something like double
negation/not exists within not exists, e.g., is
  SELECT ?X WHERE { { ?x a ex:A } FILTER NOT EXISTS { FILTER NOT
EXISTS { ?x a ex:B } } }
a legal query? According to the grammar it seems to be, but from
looking at the algebra, I can't see how I would translate that into a
proper query algebra expression. There is still @@NOT EXISTS, so maybe
all will be clear once that is defined, but inuitively, I would expect
that when evaluating the innermost FILTER NOT EXISTS, I substract
solutions from the ?x a ex:A evaluation according to the filer, but
then it is unclear what the outer FILTER NOT EXISTS works on.

E.g., my default graph has:
ex:a1 a ex:A .
ex:a2 a ex:A .
ex:a2 a ex:B .

For the BGP ?x a ex:A, I get mu1=(x/ex:a1) and mu2=(x/ex:a2). When I
then evaluate FILTER NOT EXISTS { ?x a ex:B }, it remains
mu1=(x/ex:a1), but then?

Maybe I am overlooking something here or maybe the query is not legal?

Birte

-- 
Dr. Birte Glimm, Room 309
Computing Laboratory
Parks Road
Oxford
OX1 3QD
United Kingdom
+44 (0)1865 283520
Received on Monday, 1 November 2010 16:13:26 GMT

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