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.
The next step in creating a custom refactoring operation is to create a custom operation descriptor file.