You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Andy Seaborne <an...@apache.org> on 2013/03/09 18:47:08 UTC

Re: Pseudo-IRIs in INSERT not supported?

On 26/02/13 20:16, Joshua TAYLOR wrote:
> INSERT { <_:-1ae775c2:13d1823b447:-7ffa> <urn:p>
> <_:-1ae775c2:13d1823b447:-7ff9> } WHERE {}
> update:
> INSERT {
>    _:b0 <urn:p> _:b1 .
> }
> WHERE
>    {  }

(catching up slowly ...)

INSERT with <_:...> bnodes will not work in the way you expect.

The template part of the INSERT is instantiated with new/different 
bNodes every time it is used (once per row of the WHERE clause).  Here, 
there is one row from the WHERE clause.  That is not the same as simply 
using the INSERT template.

INSERT { ... } WHERE {}

is not the same as

INSERT DATA { ... }

Its a feature of INSERT{} that all bnodes inserted are new (c.f. 
CONSTRUCT).  That's why SPARQL 1.1 adds the BNODE function that 
generates bNodes in the pattern so that, if used carefully, you can 
insert new data with bnodes that span result rows.

	Andy