Learning Tree Pattern Transformations