How to use XSLT 3.0 from a Java application?

廉价感情. 提交于 2019-12-05 22:03:12

You will need to make sure Saxon 9.8 HE or PE or EE is on your class path, HE is available on Sourceforge and Maven, the commercial editions PE and EE from saxonica.com. See http://saxonica.com/html/documentation/about/installationjava/installingjava.html and also http://saxonica.com/html/documentation/using-xsl/embedding/jaxp-transformation.html which recommend, once you have installed a particular edition, to use e.g. http://saxonica.com/html/documentation/javadoc/net/sf/saxon/TransformerFactoryImpl.html directly instead of relying on the JAXP class loader mechanism, so assuming you have Saxon 9.8 HE installed you can replace

    TransformerFactory factory = TransformerFactory.newInstance();

with

    TransformerFactory factory = new net.sf.saxon.TransformerFactoryImpl();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!