Just a sidenote - using pastebin.com or whatever other paste tool would make
the question 10 times more readable.
Cheers,
Aleksander
---- Wł. Cz, 19 lut 2015 17:44:36 +0100 Chris Wood <[email protected]>
napisał(a) ----
In the DBpedia SPARQL endpoint [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 [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+"
target='_blank'>++++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+.=""
++++}&format="text/html&timeout=30000&debug=on"" rel="nofollow"
style="margin:0px;padding:0px;border:0px;color:rgb(12,101,165);text-decoration:none"
target="_blank">result link]; however, the
http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX+dbo:+<http://dbpedia.org/ontology/> SELECT+?a+(3+3+AS+?y) WHERE+
{+ +++++?a+dc:description+"
target='_blank'>PREFIX+dbo:+<http://dbpedia.org/ontology/>
SELECT+?a+(3+3+AS+?y) WHERE+ {+ +++++?a+dc:description+"
english+footballer"+.="" +++++?a+dbpedia2:placeofbirth+:merseyside+.="" }"=""
rel="nofollow"
style="margin:0px;padding:0px;border:0px;color:rgb(12,101,165);text-decoration:none"
target="_blank">same query on the SNORQL endpoint 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.
http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX+dbo:+<http://dbpedia.org/ontology/> SELECT+?a+(3/3+AS+?y) WHERE+
{+ +++++?a+dc:description+"
target='_blank'>PREFIX+dbo:+<http://dbpedia.org/ontology/>
SELECT+?a+(3/3+AS+?y) WHERE+ {+ +++++?a+dc:description+"
english+footballer"+.="" +++++?a+dbpedia2:placeofbirth+:merseyside+.="" }"=""
rel="nofollow"
style="margin:0px;padding:0px;border:0px;color:rgb(12,101,165);text-decoration:none"
target="_blank">with division [5])
A previous question [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://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+"
target='_blank'>++++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+.=""
++++}&format="text/html&timeout=30000&debug=on""
target="_blank">http://dbpedia.org/sparql/?default-graph-uri=http://dbpedia.org&query=++++PREFIX+dc:+
++++PREFIX+:+ ++++PREFIX+dbpedia2:+ ++++SELECT+?a+(3+3+AS+?y) ++++WHERE+
++++{+ +++++++?a+dc:description+"English+footballer"+.
+++++++?a+dbpedia2:placeOfBirth+:Merseyside+.
++++}&format=text/html&timeout=30000&debug=on
3: http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX+dbo:+<http://dbpedia.org/ontology/> SELECT+?a+(3+3+AS+?y) WHERE+
{+ +++++?a+dc:description+"
target='_blank'>PREFIX+dbo:+<http://dbpedia.org/ontology/>
SELECT+?a+(3+3+AS+?y) WHERE+ {+ +++++?a+dc:description+"
english+footballer"+.="" +++++?a+dbpedia2:placeofbirth+:merseyside+.="" }"=""
target="_blank">http://dbpedia.org/snorql/?query=PREFIX+pos:+ PREFIX+dbo:+
SELECT+?a+(3+3+AS+?y) WHERE+ {+ +++++?a+dc:description+"English+footballer"+.
+++++?a+dbpedia2:placeOfBirth+:Merseyside+. }
4: http://dbpedia.org/snorql/
5: http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX+dbo:+<http://dbpedia.org/ontology/> SELECT+?a+(3/3+AS+?y) WHERE+
{+ +++++?a+dc:description+"
target='_blank'>PREFIX+dbo:+<http://dbpedia.org/ontology/>
SELECT+?a+(3/3+AS+?y) WHERE+ {+ +++++?a+dc:description+"
english+footballer"+.="" +++++?a+dbpedia2:placeofbirth+:merseyside+.="" }"=""
target="_blank">http://dbpedia.org/snorql/?query=PREFIX+pos:+ PREFIX+dbo:+
SELECT+?a+(3/3+AS+?y) WHERE+ {+ +++++?a+dc:description+"English+footballer"+.
+++++?a+dbpedia2:placeOfBirth+:Merseyside+. }
6: http://stackoverflow.com/a/15658884/889604
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion