[PATCH v2 2/2] msxml3: Don't unlink the XML declaration when saving document.

Dmitry Timoshkov dmitry at baikal.ru
Mon Apr 5 06:40:47 CDT 2021


Nikolay Sivov <nsivov at codeweavers.com> wrote:

> >> Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
> > Please don't commit this, while the patch is correct, it causes a regression:
> > ::load()/::save() leads to a bug: the saved file has double <?xml> header,
> > and needs another fix: doparse() should never add an xml declaration to a just
> > loaded XML.
> Thanks for catching that.
> >
> > Nikolay, do you recall why that code was added in the first place?
> 
> I was a long time ago. I think the reason is that libxml2 does not use a
> separate node for prolog PI, and msxml does.
> After the loading we have to expose prolog node as a normal child.
> 
> I don't think it always adds it, the meaning of 'doc->standalone != -1'
> check is to add this node only if it was present in the input.

Do you have an alternative solution to removing that code from doparse()?
Because doing so breaks the tests. I'd appreciate a bit of help on this.

-- 
Dmitry.



More information about the wine-devel mailing list