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()
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.
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()] )