user-cjw opened a new issue, #1758:
URL: https://github.com/apache/jena/issues/1758

   ### Version
   
   4.6.1
   
   ### What happened?
   
   According to specification [SPARQL 1.1 
Protocol](https://www.w3.org/TR/sparql11-protocol/), we should be able to 
select default working graph using _using-graph-uri_ parameter for 
insert/delete operations with POST update interface. For example, with 
following query
   ```
   POST /test/?using-graph-uri=http%3A%2F%2Fexample.org%2F HTTP/1.1
   Host: <fuseki server>
   Content-Type: application/sparql-update
   Content-Length: 92
   
   PREFIX ex: <http://example.org/>
   INSERT {?ent a ex:Object}
   WHERE {BIND(ex:Entity AS ?ent)}
   ```
   The tripple should be inserted into graph _<http://example.org/>_ , but 
actually it will be inserted into **default graph** instead, no matter if I use 
insert or insert data. 
   Only when I explicitly specify the graph name in SPARQL, it will insert the 
tripple into the graph correctly:
   ```
   POST /test/ HTTP/1.1
   Host: <fuseki server>
   Content-Type: application/sparql-update
   Content-Length: 120
   
   PREFIX ex: <http://example.org/>
   WITH <http://example.org/>
   INSERT {?ent a ex:Object}
   WHERE {BIND(ex:Entity AS ?ent)}
   ```
   After more tests, I find that the parameter itself is recognized, but not 
function correctly afterwards. I mean with following example:
   ```
   POST /test/?using-graph-uri=http%3A%2F%2Fexample.org%2F HTTP/1.1
   Host: <fuseki server>
   Content-Type: application/sparql-update
   Content-Length: 120
   
   PREFIX ex: <http://example.org/>
   WITH <http://example.org/>
   INSERT {?ent a ex:Object}
   WHERE {BIND(ex:Entity AS ?ent)}
   ```
   Fuseki does complain the conflict between _WITH_ keyword and 
_using-graph-uri_ parameter
   ```
   ActionErrorException with cause
   org.apache.jena.fuseki.servlets.ActionErrorException: SPARQL Update: 
Protocol using-graph-uri or using-named-graph-uri present where update request 
has USING, USING NAMED or WITH
   ```
   
   ### Relevant output and stacktrace
   
   _No response_
   
   ### Are you interested in making a pull request?
   
   None


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to