- From: Geoff Chappell <geoff@sover.net>
- Date: Tue, 29 Mar 2005 17:33:57 -0500
- To: "'Dan Connolly'" <connolly@w3.org>
- Cc: <public-rdf-dawg-comments@w3.org>
> -----Original Message----- > From: Dan Connolly [mailto:connolly@w3.org] > Sent: Tuesday, March 29, 2005 4:58 PM > To: Geoff Chappell > Cc: public-rdf-dawg-comments@w3.org > Subject: RE: Testcase comment and question > > On Tue, 2005-03-29 at 14:50 -0500, Geoff Chappell wrote: > > > > > -----Original Message----- > > > From: Dan Connolly [mailto:connolly@w3.org] > > > Sent: Tuesday, March 29, 2005 12:02 PM > > > To: public-rdf-dawg-comments@w3.org; Geoff Chappell > > > Subject: Re: Testcase comment and question > > > > > > > > Both the current editor's draft and the latest public working > > > draft give this formal specification: > > > > > > [[ > > > Definition: Optional Matching > > > > > > Given graph pattern GP1, and graph pattern GP2, let GP = (GP1 union > > > GP2). > > > > > > The optional match of GP2 of graph G, given GP1, defines a pattern > > > solution PS such that: > > > > > > If GP matches G, then the solutions of GP is the patterns solutions of > > > GP else the solutions are the pattern solutions of GP1 matching G. > > > ]] > > > > Thanks. I guess it wasn't fair to imply there was no definition. I do > think, > > though, that this one will need some tightening up. For example it seems > to > > imply that if _any_ solutions can be found in GP, then no solutions will > be > > used from GP1. > > Yes, that's what it says. > > > And assuming that's not the case, > > Er... why not? Am I missing something? One of us is, I guess :-) Consider this graph: @prefix foaf: <http://xmlns.com/foaf/0.1/> . _:a foaf:name "Johnny Lee Outlaw" . _:a foaf:mbox <mailto:jlow@example.com> . _:b foaf:name "Peter Goodguy" . and this query: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name ?mbox WHERE { ?x foaf:name ?name . OPTIONAL ?x foaf:mbox ?mbox . } Then according to the definition: GP1 = {?x foaf:name ?name .} GP2 = {?x foaf:mbox ?mbox .} GP = {?x foaf:name ?name . ?x foaf:mbox ?mbox .} R(GP, G) = {<"Johnny Lee Outlaw", <mailto:jlow@example.com> >} R(GP1, G)= {<"Johnny Lee Outlaw">, <"Peter Goodguy"> } So by the definition, the answer to query is: {<"Johnny Lee Outlaw", <mailto:jlow@example.com> >} since GP has solutions we use those. But surely we expect the results of the query to be: {<"Johnny Lee Outlaw", <mailto:jlow@example.com> >, <"Peter Goodguy", unbound> } i.e. a combination of the solutions - some from GP, some from GP1. Geoff
Received on Tuesday, 29 March 2005 22:34:15 UTC