Hi Chris,
Yes, it looks like this approach may be more appropriate for my needs. After
posting my request I found out that there is a need to support custom
character encodings (during import and export) for characters that fall into the
Unicode Private Use Area, otherwise I would try to use the
Hi Tim,
Another thing is that xslt will allow you to do character maps for
output. I've used that with custom output and the PUA. Maybe you
could create a little xml file with internal entity declarations for
input, and use the xslt for output.
Good luck!
- Chris
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
FYI – I know that I ca use the full repair option upon import – the real
challenge is adding the character encodings upon export.
From: general-boun...@developer.marklogic.com
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Tim
Sent: Wednesday, September 10, 2014 12:28 PM
To:
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(xuuml;/x))
=
xü/x
xdmp:quote(xdmp:unquote(xuuml;/x),
options xmlns=xdmp:quote
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
Hi Tim,
Maybe simplistic, but you could do it with a map:map and
analyze-string. Search for entities on the way in and look up the
names. Search for unicode char ranges that you want to convert on the
way out, and look them up in the inversion of the map:map. Something
like
xquery version