Document transformDocument