On Thu Feb 5 12:26:32 2026 +0000, Nikolay Sivov wrote:
The part about removing XML_ERR_RESERVED_XML_NAME check, yes, maybe. The other part I don't understand. Tests don't show what actually is being returned for such nodes. Is that the usual processing instruction node with "xml" target? I thought simply removing restriction on <?xml nodes in the content would be enough. Simply removing the XML_ERR_RESERVED_XML_NAME restriction was the first thing I tried, but it's not sufficient. The problem is what happens after the \<?xml?\> PI is parsed. If we just remove the fatal error and let it parse as a normal PI with target "xml", the parser then continues and parses \<DriverInfo\>\<Name\>test\</Name\>\</DriverInfo\> as child elements of \<driverXMLData\>. But from testing it appears that Windows MSXML treats the entire content after the embedded \<?xml?\> as text, the application expects to retrieve it as a string, not as a DOM subtree. That's why the previous approach wrapped it in CDATA.
The current patch replicates that behavior in libxml2, when an embedded \<?xml is encountered inside an element, it consumes everything up to the parent's closing tag and emits it via the SAX characters callback, so it becomes a text node. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10025#note_128932