cvt:destination-uri( $uri as xs:string, $extension as xs:string ) as xs:string
Construct the destination URI from the source URI using the following rules: The path prefix of the destination URI is the same as the source URI's. The filename in the destination maps '.' to '_' and appends the given extension.
Parameters | |
---|---|
uri | The URI to manipulate. |
extension | The extension to add, such as ".xml" |
xquery version "1.0-ml"; import module namespace cvt = "http://marklogic.com/cpf/convert" at "/MarkLogic/conversion/convert.xqy"; cvt:destination-uri("http://example.com/a.path/myfile.doc", ".xml") => "http://example.com/a.path/myfile_doc.xml"