When a problem is identified in a set of documents it may occur multiple times, sometimes thousands of times. In order to fix such problems we need a way to change those documents in a controlled way and we can do that with XSLT and XQuery but we need to keep as much as possible the same serialization and formatting of the documents and this is a little challenging. Alex will present the new refactoring support that allows to apply XSLT and XQuery updates on documents while trying to preserve their initial content. This can be used through a simple UI built on top of available scripts to allow also casual users to take advantage of available refactoring actions.