Skip to main content

Using MarkLogic Content Pump (mlcp)

How URI Decoding Affects Output File Names

This discussion only applies when -output_type is document.

When you export a document to a file (or to a file in a compressed file), the output file name is based on the document URI. The document URI is decoded to form the file name. For example, if the document URI is foo%20bar.xml, then the output file name is foo bar.xml.

If the document URI does not conform to the standard URI syntax of RFC 3986, decoding may fail, resulting in unexpected file names. For example, if the document URI contains unescaped special characters then the raw URI may be used.

If the document URI contains a scheme, the scheme is removed. If the URI contains both a scheme and an authority, both are removed. For example, if the document URI is file:foo/bar.xml, then the output file path is output_file_path/foo/bar.xml. If the document URI is http://marklogic.com/examples/bar.xml (contains a scheme and an authority), then the output file path is output_file_path/examples/bar.xml.

If the document URI includes directory steps, then corresponding output subdirectories are created. For example, if the document URI is /foo/bar.xml, then the output file path is output_file_path/foo/bar.xml.