问题描述
我正在使用Apache FOP 1.1.我想将当前的Apache Xalan XSLT处理器更改为其他处理器,以支持XSLT 2.0. 当前它不支持XSLT 2.0.请帮助我如何解决这个问题.谢谢.
I am using Apache FOP 1.1.I want to change current apache Xalan XSLT processor to other for supporting XSLT 2.0. Currently it is not supporting XSLT 2.0.Please help me how to solve this problem.thank you.
推荐答案
我得到了答案.TransformerFactory具有可插入性层.JAXP提供了一个通用的Java接口,可以灵活地添加所支持的标准XSLT处理器的各种实现.
I got my Answer.TransformerFactory has a plug-ability layer.JAXP provides a common Java interface that allows flexibilty to add various implementations of the supported standards XSLT processors.
TransformerFactory tFactory = TransformerFactory.newInstance();
此程序具有查找XSLT处理器的过程.由于我们未定义任何XSLT处理器,因此它将变为可用或默认状态.
This had look-up procedure to locate XSLT processors.AS we does not defined any,it will take available or default.
现在,我要添加SAXON XSLT处理器.我已经在项目中添加了 .jar文件,并且刚刚添加了
Now, I am adding SAXON XSLT processor . I have added it's .jar file in my project and just added
TransformerFactory tFactory = TransformerFactory.newInstance("net.sf.saxon.TransformerFactoryImpl",null);
就是这样.现在它将使用Saxon XSLT处理器
That's it. now it will use Saxon XSLT processor
这篇关于如何更改Apache FOP Xalan XSLT处理器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!