Hi All,
We are having issue with dls:document-version-delete API. Once the latest
version of the document is deleted, we are not able to create next version
using dls:document-checkout-update-checkin.
Here is the sequence of steps performed over xlsx (binary content)
Step 1:
let $content := BINARY_CONTENT
Step 2:
let $templateURI := URI
Step 3:
(:Insert manageable document inside ML:)
dls:document-insert-and-manage($templateURI,fn:false(),$content,())
Step 4:
(:Creating multiple Version:)
for $a in [1 to 13]
return
xdmp:eval("
import module namespace dls = 'http://marklogic.com/xdmp/dls' at
'/MarkLogic/dls.xqy';
dls:document-checkout-update-checkin( URI ,doc(URI),'update',fn:true())",
(),
<options xmlns="xdmp:eval">
<database>{xdmp:database("db-name")}</database>
</options>
)
(:Till now we are fine:)
Step 5:
let $latestVersion :=
fn:data(dls:document-history($templateURI)//dls:version-id)[last()]
Step 6:
(:Delete latest version:)
dls:document-version-delete($templateURI,$latestVersion,fn:false())
Step 7:
(:Ideally next version should be created by this step:)
dls:document-checkout-update-checkin($templateURI,$content,"update",fn:true())
(:No versions are getting created:)
The retention rule is created to maintained all version of document
Let me know in case this is an known issue or we are missing any step.
Thanks in advance
Regards
Abhishek Srivastav
Systems Engineer
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: [email protected]
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general