http://bugs.winehq.org/show_bug.cgi?id=17372
--- Comment #8 from Nikolay Sivov bunglehead@gmail.com 2010-10-31 03:32:36 CDT --- Thanks, Andrew. A problem is clear now. It creates manually the whole document including prolog. After that it does ::get_xml() from document, and this results in duplicated prolog, because:
- we don't unlink added prolog, cause 'standalone' field is not updated after adding '<?xml' node; - we don't disable automatic prolog embedding on get_xml(), and there's no way to do it for xmlNodeDump().
The quick workaround is to force 'standalone' value, it will unlink application defined prolog, but add its own which is incomplete cause document knowns nothing about encoding set in prolog.
Proper way is to disable declaration on doc dump, I'll look at that.