0

I have one situation in which I am utilizing document DLS versioning feature in the application. So, there is demand of document updated before publishing a new version of the document (the reason behind is, it require verification from the third party before publish). Below is the example for more clear idea,

/test/2c5faaaf-1f5f-4679-9918-0e8117a0ad7b.xml
/test/2c5faaaf-1f5f-4679-9918-0e8117a0ad7b_xml_versions/1-2c5faaaf-1f5f-4679-9918-0e8117a0ad7b.xml
/test/2c5faaaf-1f5f-4679-9918-0e8117a0ad7b_xml_versions/2-2c5faaaf-1f5f-4679-9918-0e8117a0ad7b.xml

In this example, I want to update some nodes in /test/2c5faaaf-1f5f-4679-9918-0e8117a0ad7b.xml (which is on the most recent version) and after the verification process, would like to create a new version (ie 3) with changes made.

It works fine in MarkLogic 7 with the help of xdmp:document-insert without losing the managed document from DLS collection and not working in MarkLogic 10

I am trying to achieve this situation because it is the demand for existing designed application which communicates with MarkLogic.

Mike Gardner
  • 6,611
  • 5
  • 24
  • 34
IAM
  • 11
  • 4
  • There's no obvious reason why that wouldn't still work. Post an example that demonstrates what is working in ML7 that doesn't work in ML10. – wst Aug 27 '19 at 13:47
  • @wst `xdmp:document-insert('/test/2c5faaaf-1f5f-4679-9918-0e8117a0ad7b.xml', data)` This works fine in MarkLogic 7 on managed document without losing the version history and not in MarkLogic 10. – IAM Aug 27 '19 at 14:01
  • @IAM What is the error you get on ML 10? – Rob S. Aug 27 '19 at 15:32
  • @RobS. when I try to update managed document using `xdmp:document-insert` it gets removed from the DLS managed document collection. This is the main issue which I am looking for a workaround. I need alternate to upate manged document. – IAM Aug 28 '19 at 10:15
  • @IAM The xdmp:document-insert command you shared doesn't include the collection so of course it is removed.Try passing it in as the 4th parameter. – Rob S. Aug 28 '19 at 13:27
  • You may need permissions beyond those of the user. The DLS library 'amps' special permissions to allow managing the various internal collections and properties. – DALDEI Aug 31 '19 at 04:08
  • After more research found a solution to this. `xdmp:node-replace` never remove the managed document from the DLS collection. Thanks for your time to respond. – IAM Aug 31 '19 at 07:10

0 Answers0