The task needs Xalan 2.x; although Xalan 1.2.2 does work, but as Xalan1 is not supported, we do not recommend this.
If you do you use Xalan 1.2.2 you will need a compatible (older) version of Xerces. as well as BSF(bsf.jar). Again, using Xalan 2 is simpler and supported.