cvt:part-uri( $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.
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. |
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"
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.