Custom Refactoring XQuery Update Script

The first step in creating a custom refactoring operation is to create an XQuery Update script. The easiest way to create this file is to use the New document wizard and create a new XQuery file.

There are cases when it is necessary to add parameters in the XQuery script. For instance, if you want to rename an element you may want to declare an external parameter associated with the name of the element to rename. To allow you to specify the value for these parameters, they need to be declared in the refactoring operation descriptor file that is associated with this operation.

Note: The XQuery Update processing is disabled by default in Oxygen XML Editor. Thus, if you want to create or edit an XQuery Update script you have to enable this facility by creating an XQuery transformation scenario and choose the Saxon EE as the transformation engine. Also, you need to make sure the Enable XQuery update option is enabled in the Saxon processor advanced options.

The next step in creating a custom refactoring operation is to create a custom operation descriptor file.

Related information
Example of an XML Refactoring Operation