Ivan,
> Consider the first OPTIONAL with a FILTER:
> OPTIONAL { ?publ <http://test/#publicationAuthor> ?p2.
> ?p2 <http://test/#emailAddress> ?p2mail.
> FILTER(?p1 != ?p2) }
>
> Unlike SQL, all used ?p1 bindings will be taken solely from the
> OPTIONAL {...} clause. There are no bindings of ?p1 in that clause at
> all so the FILTER condition should get same value regardless ?p1
> binding outside the clause. This is probably not what you need.
I don't think that is correct. Even the SPARQL spec has the following
example (6.1):
SELECT ?name ?mbox
WHERE { ?x foaf:name ?name .
OPTIONAL { ?x foaf:mbox ?mbox }
}
If ?x would be taken from within the optional clause only, the name and
email address would not need to match at all.
--
Regards/Mit freundlichen Grüßen
Christian Weiske
signature.asc
Description: PGP signature
