It turns out the preview also showed the changes I wanted, but I had to scroll past a number of namespace declaration changes to find them. When I clicked Finish, the changes I wanted were made, but all the highlighted namespace declarations had been deleted as well.

As you can see, in my case, the namespace declaration is redundant as it appears once on the root element and once on the <other> element.Is this also true for your documents? If not, please send us a sample to reproduce the problem.

Although these changes may be unwanted and they may clutter the preview dialog, the resulted document is XML-equivalent with the original one from the namespaces context point of view. The XML Refactoring processor tries to limit the amount of changes performed on the input documents but it is not 100% accurate. Under the hood an XML Refactoring operation is in fact an XQuery Update or XSLT transformation performed with some tweaks and restrictions in order to minimize unwanted changes. In the case I have described above, the namespaces declarations are optimized by the XQuery Update / XSLT processor which triggers the removal of the redundant declarations.You can read more about how an XML Refactoring operation is applied on a document here: https://www.oxygenxml.com/doc/versions/ ... tools.html

Yes, the 'xlink' namespace is also defined on the root element of my document. I don't know why the redundant declaration occurs, but unfortunately I have no control over the files I'm given to work with.

It would be convenient if there were an 'Ignore namespaces' option, as there is in the Diff tool.