如何更改 Apache FOP Xalan XSLT 处理器? [英] How to change Apache FOP Xalan XSLT Processor?

查看:31
本文介绍了如何更改 Apache FOP Xalan XSLT 处理器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 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 处理器.因为我们没有定义任何,它将采用可用或默认值.

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 处理器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆