Aklakan commented on issue #1272:
URL: https://github.com/apache/jena/issues/1272#issuecomment-1137710213

   There is now a best-effort PR - however I am not sure about the SPARQL spec 
and whether this actually opens a pandora's box:
   
   The sparql spec's 
[grammar](https://www.w3.org/TR/sparql11-query/#sparqlGrammar) allows for 
multiple prologues on each `Update` - and I am not sure whether actually need 
to stay separate or whether only the last one takes precedence.
   
   ```
   [29] | Update | ::= | Prologue ( Update1 ( ';' Update )? )?
   ```
   
   In any case, with Jena I get:
   ```java
   UpdateRequest req = UpdateFactory.create(String.join(";\n",
     "BASE <http://foo.foo/> INSERT { ?s ?s ?s } WHERE { BIND(IRI('s') AS ?s) 
}",
     "BASE <http://bar.bar/> INSERT { ?x ?x ?x } WHERE { BIND(IRI('x') AS ?x) 
}"));
   System.out.println(req);
   ```
   
   ```
   BASE    <http://bar.bar/>
   
   INSERT {
     ?s ?s ?s .
   }
   WHERE
     { BIND(iri("s") AS ?s) } ;
   INSERT {
     ?x ?x ?x .
   }
   WHERE
     { BIND(iri("x") AS ?x) }
   ```
   
   Not sure if this is the correct semantics or whether jena's update model 
actually deviates from the spec here.
   
   
   


-- 
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