From: GSO <gs...@ya...> - 2006-11-28 21:56:27
|
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 </quote> The closing/right parenthesis causes an error. GSO On 28/11/06, Seaborne, Andy <and...@hp...> wrote: > > > GSO wrote: > > A basic test statement - this works fine without the FILTER added, but > > returns a boolean false as a result with: > > > > 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 > > Firstly, that isn't valid SPARQL syntax - should be FILTER (?date >= 0). May > be that is confusing it. > > Assuming, it's not that, if ?date is a string, then it is false (it's a type > error). Literals obey datatyping. > > In SPARQL, you can cast to an integer with xsd:integer(?date). > > Andy > > > } > > ORDER BY DESC(?date) > > > > '?date' is a number created with mktime(), e.g., Literal: 1112486400. > > > > If anyone can figure the bug in this I'd very much appreciate it. > > > > Thanks > > > > GSO > > http://www.gsowww.uklinux.net/pub > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys - and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Rdfapi-php-interest mailing list > > Rdf...@li... > > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest > |