Benoit,
From the REST interface with XQuery you could use the serialization
options to output the encoding and document definition -
http://exist-db.org/xquery.html#serializationThat should enable you to make your output look the same as your input.
Cheers Adam.
2009/6/23 Benoit Mercier <
Benoit.Mercier@...>:
> Hi,
>
> I have been using eXist daily on production systems from about 2 years
> and I have just discovered today that I am not able to store and
> retrieve an XML document without information loss ;-)
>
> First of all, the following line is removed when I store documents
> having it as first line:
>
> <?xml version="1.0" encoding="UTF-16"?>
>
> Document is stored without error (via Interactive client or Java XML-RPC
> API) but the line disappeared once retrieved (via Interactive client or
> Java XML-RPC API). Via REST interface the line comes back but with
> UTF-8 encoding (I suppose it as been rewritten).
>
> I notice the same behaviour with DOCTYPE definitions like this one:
>
> <!DOCTYPE dictionnaire SYSTEM "
http://toto.ca/blabla.dtd">
>
> Note that the given DTD isn't recorded in catalog.xml and I am currently
> using eXist 1.2.6 on Linux (Ubuntu Server).
>
> Am I wrong? How to keep these lines when storing document in eXist
> database? The encoding is very important for me: how to be sure that
> eXist will store/retrieve it correctly ?
>
> Thank you very much in advance for your help!
>
> Best regards,
>
> Benoit (mercibe)
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Exist-open mailing list
>
Exist-open@...
>
https://lists.sourceforge.net/lists/listinfo/exist-open>
--
Adam Retter
eXist Developer
{ United Kingdom }
adam@...
irc://irc.freenode.net/existdb
------------------------------------------------------------------------------
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open