<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 1, 2021 at 1:07 PM Jefferson Carpenter <<a href="mailto:jeffersoncarpenter2@gmail.com">jeffersoncarpenter2@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2/1/2021 9:36 AM, Nikolay Sivov wrote:<br>
> This seems to be correct in assumption that document output is treated<br>
> separately. Quick testing shows that it's using some internal interface<br>
> that the document object implements. It might be used to lock/unlock<br>
> document while writer is populating it. <br>
<br>
Ok, sorry to change the topic / scope but do you think it would be <br>
better to write a custom class that implements IXMLDOMDocument (and <br>
IDispatch) and pass that to the mxwriter instead of instantiating a <br>
DOMDocument?  That is, do it like test_saxreader.<br>
<br>
I think that's better because then we could gain some visibility into <br>
what interfaces the Microsoft msxml queries for, and how it locks and <br>
unlocks the document.<br>
<br>
I'll do it that way in the next version, and use call_entry / <br>
call_sequence structs like the saxreader tests.<br>
<br>
So to improve the tests I think it<br>
> would be interesting to see if written nodes appear right away on SAX<br>
> calls, and if modifying methods of IXMLDOMDocument are indeed disabled<br>
> during this process. Another case that's not tested is writing to non-empty<br>
> document. Also you can remove the part that uses attributes, I don't think<br>
> it's valuable.<br>
> <br>
<br>
Also, by checking that the correct call sequences are invoked by <br>
mxwriter, the nodes would appear right away by virtue of a correct wine <br>
DOMDocument implementation.  (If they don't, that's a domdoc.c patch).<br></blockquote><div><br></div><div>No, I don't think you should do a full match of calls that are made. It would be enough to introduce some private interface for now, and reject external document implementations. It does not have to be a COM interface.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Should I commit a short test that's correct, or try to get the whole <br>
thing right in one go?<br>
</blockquote></div></div>