On 2/19/15 12:33 PM, Kingsley Idehen wrote:
On 2/19/15 11:44 AM, Chris Wood wrote:In the DBpedia SPARQL endpoint <http://dbpedia.org/sparql/> [1], running |PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX : <http://dbpedia.org/resource/> PREFIX dbpedia2: <http://dbpedia.org/property/> SELECT ?a (3+3 AS ?y) WHERE { ?a dc:description "English footballer" . ?a dbpedia2:placeOfBirth :Merseyside . } |Shows all |English Footballers| who were born in Merseyside, with column |y| just displaying the value |6| on every row [result link <http://dbpedia.org/sparql/?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=++++PREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0A++++PREFIX+%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F%3E%0D%0A++++PREFIX+dbpedia2%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fproperty%2F%3E%0D%0A%0D%0A++++SELECT+%3Fa+%283%2B3+AS+%3Fy%29%0D%0A++++WHERE+%0D%0A++++%7B+%0D%0A+++++++%3Fa+dc%3Adescription+%22English+footballer%22+.%0D%0A+++++++%3Fa+dbpedia2%3AplaceOfBirth+%3AMerseyside+.%0D%0A++++%7D&format=text%2Fhtml&timeout=30000&debug=on>]; however, the same query <http://dbpedia.org/snorql/?query=PREFIX+pos%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2003%2F01%2Fgeo%2Fwgs84_pos%23%3E%0D%0APREFIX+dbo%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0D%0A%0D%0ASELECT+%3Fa+%283%2B3+AS+%3Fy%29%0D%0AWHERE+%0D%0A%7B+%0D%0A+++++%3Fa+dc%3Adescription+%22English+footballer%22+.%0D%0A+++++%3Fa+dbpedia2%3AplaceOfBirth+%3AMerseyside+.%0D%0A%7D> on the SNORQL endpoint <http://dbpedia.org/snorql/> displays an error:|Virtuoso 37000 Error SP030: SPARQL compiler, line 16: syntax error at '3' before 'AS' SPARQL query: define sql:big-data-const 0 #output- format:application/sparql-results+json define input:default-graph-uri PREFIX owl: PREFIX xsd: PREFIX rdfs: PREFIX rdf: PREFIX foaf: PREFIX dc: PREFIX : PREFIX dbpedia2: PREFIX dbpedia: PREFIX skos: PREFIX pos: PREFIX dbo: SELECT ?a (3 3 AS ?y) WHERE { ?a dc:description "English footballer" . ?a dbpedia2:placeOfBirth :Merseyside . } |Even more strangely, using any of the other 3 arithmetic operators /does/ work in the SNORQL endpoint (e.g. with division <http://dbpedia.org/snorql/?query=PREFIX+pos%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2003%2F01%2Fgeo%2Fwgs84_pos%23%3E%0D%0APREFIX+dbo%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0D%0A%0D%0ASELECT+%3Fa+%283%2F3+AS+%3Fy%29%0D%0AWHERE+%0D%0A%7B+%0D%0A+++++%3Fa+dc%3Adescription+%22English+footballer%22+.%0D%0A+++++%3Fa+dbpedia2%3AplaceOfBirth+%3AMerseyside+.%0D%0A%7D> [5])A previous question <http://stackoverflow.com/a/15658884/889604> [6] on Stackoverflow has implied that the SPARQL and SNORQL endpoints should return the same result, so what's going on here?!Cheers, Chris 1: http://dbpedia.org/sparql/2: http://dbpedia.org/sparql/?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=++++PREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0A++++PREFIX+%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F%3E%0D%0A++++PREFIX+dbpedia2%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fproperty%2F%3E%0D%0A%0D%0A++++SELECT+%3Fa+%283%2B3+AS+%3Fy%29%0D%0A++++WHERE+%0D%0A++++%7B+%0D%0A+++++++%3Fa+dc%3Adescription+%22English+footballer%22+.%0D%0A+++++++%3Fa+dbpedia2%3AplaceOfBirth+%3AMerseyside+.%0D%0A++++%7D&format=text%2Fhtml&timeout=30000&debug=on 3: http://dbpedia.org/snorql/?query=PREFIX+pos%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2003%2F01%2Fgeo%2Fwgs84_pos%23%3E%0D%0APREFIX+dbo%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0D%0A%0D%0ASELECT+%3Fa+%283%2B3+AS+%3Fy%29%0D%0AWHERE+%0D%0A%7B+%0D%0A+++++%3Fa+dc%3Adescription+%22English+footballer%22+.%0D%0A+++++%3Fa+dbpedia2%3AplaceOfBirth+%3AMerseyside+.%0D%0A%7D4: http://dbpedia.org/snorql/5: http://dbpedia.org/snorql/?query=PREFIX+pos%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2003%2F01%2Fgeo%2Fwgs84_pos%23%3E%0D%0APREFIX+dbo%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0D%0A%0D%0ASELECT+%3Fa+%283%2F3+AS+%3Fy%29%0D%0AWHERE+%0D%0A%7B+%0D%0A+++++%3Fa+dc%3Adescription+%22English+footballer%22+.%0D%0A+++++%3Fa+dbpedia2%3AplaceOfBirth+%3AMerseyside+.%0D%0A%7D6: http://stackoverflow.com/a/15658884/889604Scratching my head here!Don't even know how snorql has been configured to front the default endpoint, which is returning the results as expected.I'll check with my team to see if this is some strange configuration issue.
The snorql doesn't encode properly plus, so the expression becomes : "SELECT ?a (3 3 AS ?y)” which is wrong.
-- Regards, Kingsley Idehen Founder & CEO OpenLink Software Company Web: http://www.openlinksw.com Personal Weblog 1: http://kidehen.blogspot.com Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen Twitter Profile: https://twitter.com/kidehen Google+ Profile: https://plus.google.com/+KingsleyIdehen/about LinkedIn Profile: http://www.linkedin.com/in/kidehen Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________ Dbpedia-discussion mailing list Dbpedia-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion