- From: Geoff Chappell <geoff@sover.net>
- Date: Thu, 24 Feb 2005 10:02:13 -0500
- To: <jos.deroo@agfa.com>
- Cc: <andy.seaborne@hp.com>, <public-rdf-dawg-comments@w3.org>
> -----Original Message-----
> From: jos.deroo@agfa.com [mailto:jos.deroo@agfa.com]
> Sent: Thursday, February 24, 2005 8:06 AM
> To: geoff@sover.net
> Cc: andy.seaborne@hp.com; public-rdf-dawg-comments@w3.org
> Subject: RE: Questions about OPTIONAL
>
> [...]
>
> > That seems more like:
> > A and (B or true)
> > than:
> > A and (B or not B)
> >
> > You can't really simulate an optional without some form of not (NAF).
>
> I still do the former, but that gives, as Andy says unhelpful answers.
> I also did the latter a while back, but then in a monotonic way using
> log:notIncludes, however a test case like
Do you mean non-monotonic? It seems to me an implementation of OPTIONAL is
implicitly non-monotonic (at least for selects, possibly some
order-dependant forms of optional with construct are monotonic since you're
not actually returning NULLs) so it seems reasonable to have to use nonmon
features in your language to implement it.
> http://www.w3.org/2001/sw/DataAccess/tests/#dawg-opt-query-001
> is then not giving that "Eve" solution (it works nicely for instance
> when in the data :eve is used, but bnodes are existential variables
> and ?SRC log:notIncludes {_:eve_0 foaf:mbox <#mbox>} is not the case).
> I actually can't implement OPTIONAL
That sounds like some sort of a quantification problem. In the query you
cite:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?mbox
WHERE
(?person foaf:name ?name)
[ (?person foaf:mbox ?mbox) ]
if you've implement that as:
(?person foaf:name ?name)
and ((?person foaf:mbox ?mbox) or
not (?person foaf:mbox ?mbox))
you're not saying: not exists any person with a foaf:mbox, but: not exists a
foaf:mbox for each person bound by previous triple.
Or did I entirely misunderstand what you meant :-)?
> --
> Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/
Geoff
Received on Thursday, 24 February 2005 15:03:05 UTC