Hi,

I have a document with below structure. and it is saved under URI
'/{runlevel}/{userid}/jobs.xml'

<joblist>
     <job>
            <id>1</id>
            .
            .
     </job>
     <job>
             <id>2</id>
             .
             .
      </job>
      .
      .
</joblist>


Each job element is a fragment as I have fragment root defined for the Job
element.
I am retrieving specific job element using cts:search and then trying to
update the element.

let $job := cts:search(/joblist/job,
cts:and-query(cts:document-query('/runlevel/userid/jobs.xml'),
cts:element-range-query(xs:QName('id'), '=', '1'))))

return if($job)
          then xdmp:node-replace($node, element job {....})
          else ()

My question is does the above query locks the entire document under URI
 '/{runlevel}/{userid}/jobs.xml' or does it specifically lock the fragment
that is picked in the search query?



Thanks,
Sudheer Yalaverthi
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to