MarkLogic Server 11.0 Product Documentation
cvt:part-uri

cvt:part-uri(
   $uri as xs:string,
   $part as xs:string
) as xs:string

Summary

Construct the URI for the part using the following rules: The path prefix of the part URI is the same source URI's, followed by a subdirectory name. The subdirectory name is formed by mapping '.' to '_' in the source filename and appending '_parts' to it. The part's filename is unchanged, but any part path is removed.

Parameters
uri The URI to manipulate.
part The part to append to the URI. Only the filename is appended; any subdirectories preceding the filename are removed.

Example

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

  cvt:part-uri("http://example.com/a.path/myfile.doc", 
               "images/image1.jpg")
  
  => "http://example.com/a.path/myfile_doc_parts/image1.jpg"
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy