CONSTRUCT {
<@SUBJECT@> ?p ?o.
?o rdfs:label ?olabel
}
WHERE {
<@SUBJECT@> ?p ?o
FILTER (isIri(?o) or lang(?o)="" or lang(?o)="@LANGUAGE@")
OPTIONAL {
?o rdfs:label ?olabel.
FILTER (lang(?olabel) or lang(?olabel)="@LANGUAGE@")
}
}
when I import this example (with this query) into the RDF storage (GraphDB) and access http://localhost:8080/resource?subject=http://nl.dbpedia.org/resource/Amersfoort
I got
(resource-error)MALFORMED QUERY: Lexical error at line 8, column 24. Encountered: " " (32), after : "or"
when I executed this query (with proper substitution for <@SUBJECT@> on Virtuoso endpoint I got the expected result. However when I try to execute it in GraphDB I got :
MALFORMED QUERY: Lexical error at line 9, column 25. Encountered: " " (32), after : "or"
a solution is to replace the or with || .
The query with or is considered invalid not only by GraphDB but also by Fuseki, the specification is also mentioning logical-or as ||
In the example file https://github.com/architolk/Linked-Data-Theatre/blob/master/examples/tutorial/dbpediaresource.ttl
there is a query for DBPedia:
when I import this example (with this query) into the RDF storage (GraphDB) and access
http://localhost:8080/resource?subject=http://nl.dbpedia.org/resource/Amersfoort
I gotwhen I executed this query (with proper substitution for <@SUBJECT@> on Virtuoso endpoint I got the expected result. However when I try to execute it in GraphDB I got :
a solution is to replace the
or
with||
.The query with
or
is considered invalid not only by GraphDB but also by Fuseki, the specification is also mentioning logical-or as||
Used version of Linked Data Theatre : 1.16.0