From: Will D. <ma...@wi...> - 2008-08-14 10:05:23
|
This sounds like a bug I filed back in March (fix provided) though I don't remember the details precisely now to confirm 100% that it's the same issue: http://sourceforge.net/tracker/index.php?func=detail&aid=1928579&group_id=63257&atid=503361 <http://sourceforge.net/tracker/index.php?func=detail&aid=1928579&group_id=63257&atid=503361> Unfortunately, the bugs do not appear to be attended to. If anybody can and wants to grant me access to the svn, I'd be happy to fix a few. Regards, Will Sergey Chernyshev wrote: > It looks like RAP is having a significant issue with handling OPTIONAL > blocks - when variable from mandatory part is also used within > OPTIONAL block and non-optional part of the query matches nothing, > OPTIONAL block still gets executed as if there was no mandatory part > of the query. > > For example, query like this: > *PREFIX dc: <http://purl.org/dc/elements/1.1/>* > *PREFIX foaf: <http://xmlns.com/foaf/0.1/>* > *SELECT ?blog, ?title WHERE {* > *<http://www.sergeychernyshev.com/sergey> foaf:weblog ?blog .* > *OPTIONAL { ?blog dc:title ?title}* > *}* > > ran against http://www.sergeychernyshev.com/sergey.rdf (where > foaf:weblog triple exists) works fine and returns one entry with > defined ?blog and empty ?title. > > But query > *PREFIX dc: <http://purl.org/dc/elements/1.1/>* > *PREFIX foaf: <http://xmlns.com/foaf/0.1/>* > *SELECT ?blog, ?title WHERE {* > *<http://www.w3.org/People/Berners-Lee/card#i> foaf:weblog ?blog .* > *OPTIONAL { ?blog dc:title ?title}* > *}* > ran against http://www.sergeychernyshev.com/profile/tests/timbl.rdf > (where no foaf:weblog triples exist) returns ?blog variables bound to > all subjects that have dc:title properties as if this query was ran > *PREFIX dc: <http://purl.org/dc/elements/1.1/>* > *PREFIX foaf: <http://xmlns.com/foaf/0.1/>* > *SELECT ?blog, ?title WHERE {* > *OPTIONAL { ?blog dc:title ?title}* > *}* > > I don't even know how to approach this! Will appreciate any help. > > Thank you, > > Sergey > > > -- > Sergey Chernyshev > http://www.sergeychernyshev.com/ > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > Rdfapi-php-interest mailing list > Rdf...@li... > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest > |