These are also available via the xdmp:output option in the XQuery prolog: http://docs.marklogic.com/guide/xquery/langoverview#id_71572
Note that you will not see the effect of these when running in Query Console because the output options only affect the outer query, and underneath the covers in Query Console it is running an eval of whatever query you enter. -Danny From: [email protected] [mailto:[email protected]] On Behalf Of Joe Bryan Sent: Wednesday, September 10, 2014 12:58 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] How to export XML to ASCII text with ISO encodings? Hi Tim, There's a serialization option to control which entities are output: "output-sgml-character-entities" (see http://docs.marklogic.com/xdmp:quote). xdmp:quote(xdmp:unquote("<x>ü</x>")) => <x>ΓΌ</x> xdmp:quote(xdmp:unquote("<x>ü</x>"), <options xmlns="xdmp:quote"> <output-sgml-character-entities>normal</output-sgml-character-entities> </options>) => <x>ü</x> Thanks. -jb From: Tim <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Wednesday, September 10, 2014 at 3:49 PM To: 'MarkLogic Developer Discussion' <[email protected]<mailto:[email protected]>> Subject: Re: [MarkLogic Dev General] How to export XML to ASCII text with ISO encodings? FYI - I know that I ca use the full repair option upon import - the real challenge is adding the character encodings upon export. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Tim Sent: Wednesday, September 10, 2014 12:28 PM To: 'MarkLogic Developer Discussion' Subject: [MarkLogic Dev General] How to export XML to ASCII text with ISO encodings? Hi Folks, I am importing content from an ASCII text file into an XML record to manage updates in MarkLogic, but upon request I need to export an updated ASCII text file. The ASCII text file can include a variety of ISO encodings and upon export it is required that some ASCII characters (such as apostrophes and ampersands) be out put with their equivalent ISO encoding, i.e., "'" and "&") and that any characters exceeding the ASCII range be output with ISO encodings, e.g., "ü". First of all I need to ensure that any text content with ISO encodings can be adequately imported into its UTF-8 representation. Secondly, upon export to a text file, I need to add back in the ISO entity encodings. Any suggestions? Thank you! Tim M.
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
