可以用apache公司的xalan
http://xml.apache.org/xalan-j/index.html
Xalan-Java is an XSLT processor for transforming XML documents into HTML, text, or other XML document types. It implements XSL Transformations (XSLT) Version 1.0 and XML Path Language (XPath) Version 1.0. It can be used from the command line, in an applet or a servlet, or as a module in other program.Xalan-Java recasts Xalan as an implementation of the Transformation API for XML (TRaX) interfaces, part of the Java API for XML Processing 1.2. TRaX provides a modular framework and a standard API for performing XML transformations, and it utilizes system properties to determine which Transformer and which XML parser to use.Xalan-Java also builds on SAX 2 and DOM level 2.