FILTER evaluation problem

I think that the evaluation of the following query is not clear

PREFIX : <http://ing.utalca.cl/~jperez/research/rdf/>
SELECT *
FROM :sample1.rdf
WHERE {
  ?A :name ?N .
  OPTIONAL { ?A :email ?E . FILTER ( bound(?W) ) } .
  OPTIONAL { ?A :webPage ?W  }
}

Are there some restrictions about the variables that may be used in a FILTER 
expression? The query appears to be syntanctically correct but, because the 
OPTIONAL is left associative it is not clear (not for me) how to evaluate the 
FILTER. Note that the problem has nothing to do with the use of bound, every 
filter expression in this position that uses ?W would cause a similar problem. 
The problem is originated because the associative rules induce 
an "incremental" form of evaluation from "left to right" and in the filter 
exprresion appears a variable that has not been named yet in the query.

If the OPTIONAL were not left associative then I think that the evaluation 
would give (informally) "the name of the persons, optionally the email for 
those who have web page, and optionally the web page"....

- Jorge

-------------------------------------------------
Este mensaje fue enviado por: http://webmail.utalca.cl

Received on Thursday, 20 April 2006 23:19:28 UTC