I don't see anything obviously wrong (although you may want to fix the last 
line to be

>   BIND(IRI(CONCAT("urn:", ?newOB, "_Q")) AS ?newO)       

i.e. drop the duplicate ::

Was there anything else in the error message or log, i.e. a full stack trace? 
It is hard for me to try this out without having suitable instance data.

Holger


> On 18 May 2023, at 10:20 am, Kasia Kryczka <[email protected]> wrote:
> 
> Hi,
> 
> I would like to replace an object with a new object via following query (I'm 
> using EDG):
> 
> DELETE {
>   ?s ?p ?o .
> }
> INSERT {
>  ?s ?p ?newO .
> }
> #SELECT DISTINCT ?o ? newO
> WHERE {
>   ?s ?p ?o .
>     
>   FILTER(STRSTARTS(STR(?o), "urn:") && STRENDS(STR(?o), "_P_Q"))
>   BIND(REPLACE(STR(?o), "^(.*)ttt:(.*)_P_Q$", "$2") AS ?newOB)
>   BIND(IRI(CONCAT("urn::", ? newOB  , "_Q")) AS ?newO)       
> }
> 
> but i get the following error:
> Failed to execute SPARQL request: org.apache.jena.graph.Node$NotLiteral: 
> urn:_P_Q is not a literal node
> 
> Could you tell how I can correct it?
> 
> Thanks,
> 
> Kasia
> 
> 
> -- 
> The topics of this mailing list include TopBraid EDG and related technologies 
> such as SHACL.
> To post to this group, send email to [email protected]
> --- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/989ec7ed-73a4-4bd6-90b1-98fff87c05b0n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/989ec7ed-73a4-4bd6-90b1-98fff87c05b0n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to [email protected]
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/BF35EC86-1074-42F9-B3AC-F830326F6F5B%40topquadrant.com.

Reply via email to