Thanks for the offers of help, everyone! The problem turned out to be my classpath. It contained an xerces.jar which wasn't from my xalan download; replacing it with xalan-j_2_2_D11/bin/xerces.jar solved the problem (solution courtesy of Ian Lea).