I have couple of documents on which xdmp:node-replace()
over certain elements doesnot work. There are some other set of documents which are almost similar to th
If you want to update in-memory nodes as if they were in the database by using similar function calls, there's a utility library that does that:
https://github.com/marklogic/commons/tree/master/memupdate
The main library also ships with MarkLogic Server under App Services:
appservices/utils/in-mem-update.xqy