|
|
cvt:save-converted-documents(
|
|
$source-uri as xs:string,
|
|
$destination-uri as xs:string,
|
|
$manifest as element(),
|
|
$docs as document-node()*
|
| ) as empty() |
|
 |
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.
|
|
Example:
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()] )
|
|
|