Hi, Danny: One technique is to execute xdmp:eval(), xdmp:invoke(), or xdmp:invoke-function() in separate transactions to write and read the result.
The main routine is the choreographer for the write and read requests and can keep program state. Using inline functions and closures, xdmp:invoke-function() is especially convenient. Hoping that helps, Erik Hennum ________________________________ From: [email protected] [[email protected]] on behalf of Danny Sinang [[email protected]] Sent: Friday, July 17, 2015 10:51 AM To: general Subject: [MarkLogic Dev General] Displaying document after an update I need to display a document right after a call to xdmp:node-replace() is made, and I'm able to achieve this by using a semi-colon to place them in separate transactions. xdmp:node-replace($environment, $new-environment); fn:doc("/release-tracking/components/2.xml") Problem is, only the first transaction has enough data to derive the URI of the document to be displayed. Thus my hardcoding the path in the second transaction. Is there a way to pass this URI from the first to the second transaction ? Or is there another / better way of displaying the doc after the update ? Regards, Danny
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
