Hi, Would I be correct that the following type of XQuery should be translated to a sequence of REST calls using a tx-id. So, a single simple XQuery update such as:
if (xdmp:exists(doc($documentUri))) then ( if ($timeCode < xs:dateTime(doc($documentUri)/document/header/timeStamp) ) then () else ( xdmp:document-insert($documentUri, xdmp:unquote($xml), xdmp:default-permissions(), local:getCollections()) ) )else ( xdmp:document-insert($documentUri, xdmp:unquote($xml), xdmp:default-permissions(), local:getCollections()) ) Would be translated to a number of REST calls: Get a transaction; /transactions Invoke XQuery to get time stamp using the tx id; /query Update Document using the tx id; /documents Or is there a better way of doing this using the current REST API spec? There could be a lot of I/O etc for something quite simple. I may have missed something here so please do point me in the right direction. Cheers Jem http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this.
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
