FILTER inside FILTER?

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 UTC