Loading TOC...


   $uri as xs:string,
   $part as xs:string
) as xs:string


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.

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.


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

  => "http://example.com/a.path/myfile_doc_parts/image1.jpg"

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