[MarkLogic Dev General] Appending the XML declaration when making a document available for download
tim at aaom.net
Mon Jun 7 16:27:46 PDT 2010
I'm trying to insert the XML header declaration when grabbing an XML
document for download as one of the apps that reads the file needs to know
the type of encoding. I tried prepending the XML declaration and encoding by
doing the following:
let $uri := blahblahblah
let $filename := blahblahblah
let $disposition := concat("attachment; filename=""", $filename, """")
let $xml-header := <?xml version="1.0" encoding="UTF-8" ?>
but encounter the following error:
XDMP-XMLPI: (err:XPST0003) <?xml version="1.0" encoding="UTF-8" ?> --
Processing instructions may not have the target 'XML'
How can I prepend the XML declaration without getting this error? I noticed
some example of making this work with a document insert, but can't figure
out workaround for the downloading the XML document.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the General