1. A method of editing a set of rules contained in a first document, said rules defining a transformation of data on a second document, said first document and said second document having elements constructed in a tree structure having nodes, each said rule on said first document having a template structure including at least one match condition, said match condition being an expression in said template that describes a subset of tree nodes, said method comprising: selecting at least one rule in said first document; and checking a match condition of said at least one selected rule with said tree nodes from said second document to determine which structures in said second document match said selected rule.