Loading TOC...

MarkLogic 10 Product Documentation
cvt:save-converted-documents

cvt:save-converted-documents(
   $source-uri as xs:string,
   $destination-uri as xs:string,
   $manifest as element(),
   $docs as document-node()*,
   [$destination-collections as xs:string*]
) as empty-sequence()

Summary

Save a set of converted documents, with appropriate links. If there is a main document, it must be the first listed in the manifest. The order in the manifest (as in xdmp:xxx-convert) must match the order of document nodes. Any cleaning or other preprocessing of the documents must already have been done. If certain parts should have been created in a certain state or with other initial properties, that must be done after the call to this function.

Parameters
source-uri The URI of the source document.
destination-uri The URI of the root destination (converted) document.
manifest The parts list of all the conversion products, as returned by xdmp:pdf-convert, xdmp:word-convert, etc. The main or root document should be the first on the list, if there is one.
docs The documents produced by conversion, in the same order as in the manifest.
destination-collections The collections for the destination document. The default is the empty sequence.

Example

  xquery version "1.0-ml";
  import module namespace cvt = "http://marklogic.com/cpf/convert" 
		  at "/MarkLogic/conversion/convert.xqy";

  let $results := xdmp:word-convert( doc("myfile.doc"), "myfile.doc" )
  return 
     cvt:save-converted-documents("myfile.doc", "myfile.doc",
        $results[1], $results[2 to last()] )
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.