Loading TOC...

MarkLogic Server 11.0 Product Documentation
cvt:destination-uri

cvt:destination-uri(
   $uri as xs:string,
   $extension as xs:string
) as xs:string

Summary

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"

Example

  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"
  

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