We seem to have problems with restoring external instances (via xforms-reset), when they are external and they have been replaced via submission.
This warning is printed:
WARNING: failed to restore original instance document: 'NS_SUCCEEDED(rv)', file nsXFormsInstanceElement.cpp, line 385
Hmm, should there be importNode, not cloneNode. At least in trunk.
Created attachment 223005 [details]
Testcase (not working out-of-the-box)
Here's a testcase, but with external instances, etc. it needs to be fiddled with to get working. But it should show "the concept".
Created attachment 223029 [details] [diff] [review]
Just clone the original document and set it as the instance document.
I see no reason for trying to retain the original document element, as we replace that on submissions, etc. anyway.
Fixed on trunk