SPARQL Query - does not handle datatypes like SPARQL 1.1?

The following conversion of literals into doubles works fine with SPARQL 1.1 e.g.

PREFIX xsd: http://www.w3.org/2001/XMLSchema#
PREFIX : http://dbpedia.org/resource/
PREFIX dbp: http://dbpedia.org/property/

select xsd:double(?carbs), xsd:double(?fat)
where { :Asparagus dbp:carbs ?carbs ; dbp:fat ?fat . }

BUT it results in the following error message in KNIMW Labs/ Semantic Web/ SPARQL Query.

What do I miss?

What do I miss?

The error message.

Badumm Tsss

Hi @SPIME,
the error message would indeed be helpful.

Pretty basic omission. My bad.

The message on the KNIMW console reads:
ERROR SPARQL Query 0:17 Execute failed: Encountered " <PNAME_LN> "xsd:double “” at line 5, column 8.
Was expecting one of:


“distinct” …
“reduced” …
“(” …
“*” …

The same query on https://dbpedia.org/sparql yields

callret-0 callret-1
3.88 0.12

Lastly, note, that the prefixes are written properly, i.e. IRIs are enclosed in ‘<’ and ‘>’. For some reason my initial copy/paste lost the ‘<’ and ‘>’.

Hey @SPIME
we are using the Jena Framework and the SPARQL1.1 Parser. The given query is actually not a valid SPARQL1.1 query, Virtuoso accepts extended syntax. You can check your query with with http://sparql.org/query-validator.html

best Mareike