An invoke is in its own transaction, so it cannot hold onto the locks needed to update it (nor would you want it to). You are making a copy, which turns it into an in-memory node.
So yes, if you want to update it in another program, you will have to provide the other program a way to access it. -Danny From: [email protected] [mailto:[email protected]] On Behalf Of Jakob Fix Sent: Thursday, June 26, 2014 1:31 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] external nodes cannot be updated Hi Danny, I understand that. However, I don't understand why you cannot update it. Is it a copy of the original node that's being passed to the invoked modle? Of course, there are ways around it, like document(xdmp:node-uri($original-node))/* to get the root node of the external node, but it was just a bit confusing to not see it mentioned in the documentation. cheers, Jakob. On Thu, Jun 26, 2014 at 10:25 PM, Danny Sokolsky <[email protected]<mailto:[email protected]>> wrote: Hi Jakob, A node that is passed in from an invoking module is an external node (even if it was created by copying a node from the database). Does that make sense? -Danny From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Jakob Fix Sent: Thursday, June 26, 2014 1:18 PM To: General Mark Logic Developer Discussion Subject: [MarkLogic Dev General] external nodes cannot be updated Hi, it seems that a node that has been passed in from an invoking module (via one of the xdmp:invoke or xdmp:spawn functions) cannot be updated inside the invoked code. Is this behaviour by design? Why? If so, I couldn't find a mentioning of this in the documentation. For example, http://docs.marklogic.com/xdmp:node-insert-child lists quite a number of restrictions where it won't work (in-memory nodes, no document nodes as child nodes of element nodes, ...), but not this one. cheers, Jakob. _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
