From: <pl...@do...> - 2007-07-21 17:07:18
|
Christian (or whoever may be able to answer :), Unfortunately (unless you've spotted something I've not?) I don't see =20 any way that you can disambiguate this case. How can we know from the =20 Query object if the query was { { ?s :p1 ?o } OPTIONAL { ?s :p2 ?o2 . } { ?s :p3 ?o3 . } } or { { ?s :p1 ?o } OPTIONAL { { ?s :p2 ?o2 . } { ?s :p3 ?o3 . } } } ...as the Query object contains nothing linking those BGPs (?s :p2 ?o2 =20 and ?s :p3 ?o3) as the right hand side of the OPTIONAL? They are =20 simply graph patterns in the Array, the same as ?s :p1 ?o; the SPARQL =20 engine will simply join them onto the result, not left-join them. Am I =20 missing something? Cheers, Peter Quoting Christian Weiske <cw...@cw...>: > Peter, > >> triple pattern. However, RAP parses this into a Query opbject >> equivalent to: >> >> { >> { ?s :p1 ?o } >> OPTIONAL >> { } >> { ?s :p2 ?o2 . } >> { ?s :p3 ?o3 . } >> } > > This is a behavior of SparqlParser that is weird, but cannot be taken > away simply due to the internal working. > In my SparqlEngineDb, I check if the pattern is empty and skip it in > that case. > > > -- > Regards/Mit freundlichen Gr=FC=DFen > Christian Weiske > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rdfapi-php-interest mailing list > Rdf...@li... > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest > |