1. A computer-implemented method for transformation of tree structured data containing a set of nodes, comprising: generating, responsive to a determination that a predicate of a rule matches a given node in the set of nodes, a compound result and an interim mutated output document by applying a function of the rule to the given node; determining, responsive to a determination that the compound result contains a next node, whether the next node is compared with a predicate of a next rule; applying, responsive to a determination that the predicate of the next rule matches the next node, a function of an identified rule to next node to generate a second compound result and interim mutated output document; and generating a final mutated output document using the interim mutated output document as input, wherein the compound result includes a node to process next and an instruction indicating continue or break.