Hi,
I assume that any query that is executed in the web console should yield the same result as from the sparql endpoint.
Apparently, this is not the case as the following example demonstrates:
Given the following data:
@prefix : <test#> .
:a :before :b .
:b :before :c .
:c :before :d .
and the query: select * where {:a (:before)+ ?o}
Executed in the web console yields as expected the following result:
<?xml version='1.0' encoding='UTF-8'?>
<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
<head>
<variable name='o'/>
</head>
<results>
<result>
<binding name='o'>
<uri>http://api.stardog.com/test#b</uri>
</binding>
</result>
<result>
<binding name='o'>
<uri>http://api.stardog.com/test#c</uri>
</binding>
</result>
<result>
<binding name='o'>
<uri>http://api.stardog.com/test#d</uri>
</binding>
</result>
</results>
</sparql>
Now I try the same via the SPARQL endpoint e.g. with curl:
curl --request POST --header "Accept: application/sparql-results+xml" --data-binary 'query=select * where {:a (:before)+ ?o}' 'http://example.com:5820/test/query'
this gives me a restricted result missing c
and d
:
<?xml version='1.0' encoding='UTF-8'?>
<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
<head>
<variable name='o'/>
</head>
<results>
<result>
<binding name='o'>
<uri>http://api.stardog.com/test#b</uri>
</binding>
</result>
</results>
</sparql>
It seems that the path operator +
is ignored in this case - looks like a parse error?!
Note: I am running Stardog Community 5.0.3.
Regards, Immanuel