[MarkLogic Dev General] Regarding Spawn function not working

Mani, Sivasubramani (ELS) s.mani at elsevier.com
Tue Jan 9 22:17:45 PST 2018


Hi  Team,

I try to update the xml nodes more than one time using xdmp:spawn function , but the update was not happened inside the spwan function , I have specified the sample code below. Kindly do the needful

let $updateact_deact := xdmp:spawn-function(function(){
                          ( xdmp:node-replace($userPersonalInfo/us:isActive,
                                        <us:isActive>false</us:isActive>)>),
                                        xdmp:commit())
                          },
                          <options xmlns="xdmp:eval">
                          <transaction-mode>update</transaction-mode>
                          </options>)

let $updatedeact_timestamp := xdmp:spawn-function(function(){
                          (xdmp:node-insert-child($userPersonalInfo/us:lastdeactAcntTimestamp,
                                        <us:lastdeactAcntTimestamp> {current-dateTime()}</us:lastdeactAcntTimestamp>),
                                        xdmp:commit())
                          },
                          <options xmlns="xdmp:eval">
                          <transaction-mode>update</transaction-mode>
                          </options>)


Thanks & Regards,
Siva

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20180110/8b9419e9/attachment.html 


More information about the General mailing list