From: Seaborne, A. <and...@hp...> - 2006-11-28 22:52:51
|
GSO wrote: > OK, you're right by the looks about not using valid syntax, however > the problem changes when I use parentheses, I then get the following > error: > > <quote> > SPARQL PARSER ERROR: ) is neither a valid rdf- node nor a variable. > In Query: > > PREFIX ll: <http://www.gsowww.uklinux.net/librarylinks/vocabulary#> > SELECT * > WHERE { ?url ll:title ?title . > ?url ll:abstract ?abstract . > ?url ll:date ?date . > ?url ll:publisher ?publisher . > FILTER (?date >= 0->)<- > > Fatal error: Call to a member function getFromNamedPart() on a > non-object in /opt/lampp/htdocs/rdfapi-php/api/sparql/SparqlEngine.php > on line 417 That looks like bad news. > </quote> > > The closing/right parenthesis causes an error. > > GSO There's a SPARQL valdiator at: http://www.sparql.org/validator.html which is running a parser derived from the master version of the SPARQL grammar (in fact, the javacc grammar it works from is the input to making the HTML in the spec via perl script). It passes the query: PREFIX ll: <http://www.gsowww.uklinux.net/librarylinks/vocabulary#> SELECT * WHERE { ?url ll:title ?title . ?url ll:abstract ?abstract . ?url ll:date ?date . ?url ll:publisher ?publisher . FILTER (?date >= 0 ) } ORDER BY DESC(?date) While the SPARQL grammar has changed, the language accepted by the grammar has not in some while. The grammar changes to better reflect the rest of the SPARQL design. I wonder if the parser is off a little, whether it is correctly gathering up the expression. Andy |