Dear Andy,
On 7/20/19 10:18 PM, Andy Seaborne wrote:
> The documentation is at:
>
> http://jena.staging.apache.org/documentation/query/construct-quad.html
>
> This is an extension - put the query in a file with extension ".arq", or
> set the syntax to Syntax.syntaxARQ.
>
> The default for .rq and the API is SPARQL 1.1
>
> The default for Fuseki is ARQ-extened syntax.
Thank you very much :-)
For other users who may encounter the same problem in the future, the
two solutions proposed by Andy are:
SOLUTION #1 = rename the query with the .arq extension
cp constructNamedGraph.rq constructNamedGraph.arq
${JENA_HOME}/bin/sparql --data=./data.ttl --query=./constructNamedGraph.arq
@prefix : <http://www.example.com/> .
:g {
:a :rel2 :b .
:d :rel2 :e .
:c :rel2 :b .
}
SOLUTION #2 = set the syntax to ARQ
${JENA_HOME}/bin/sparql --data=./data.ttl
--query=./constructNamedGraph.rq --syntax=ARQ
@prefix : <http://www.example.com/> .
:g {
:a :rel2 :b .
:d :rel2 :e .
:c :rel2 :b .
}