开源 java XSLT 2.0 实现?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/529309/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 12:45:48  来源:igfitidea点击:

Open-source java XSLT 2.0 implementation?

javaxmlopen-sourcexslt-2.0xslt

提问by otto.poellath

I'm currently looking into using XSLT 2.0, but I cannot find any open-source java implementations (Saxon-Bseems to fit the bill, but isn't schema-aware).

我目前正在考虑使用 XSLT 2.0,但找不到任何开源 java 实现(Saxon-B似乎符合要求,但不支持模式)。

Am I missing something?

我错过了什么吗?

采纳答案by Paul Sweatte

The only one is Saxon-HE:

唯一的一个是撒克逊-HE:

Saxon-HE

萨克森-HE

The W3C hosts an online version of it for testing:

W3C 托管了它的在线版本以进行测试:

W3C Jigsaw XSLT 2.0 Service

W3C Jigsaw XSLT 2.0 服务

And there is JSFiddle like version as well:

还有类似 JSFiddle 的版本:

xsltransform.net

xsltransform.net

And the Frameless project hosts a JavaScript version of it:

Frameless 项目托管了它的 JavaScript 版本:

XSLT Fiddle

XSLT 小提琴

There's also an App Engine project which uses it:

还有一个使用它的 App Engine 项目:

XSLT App Engine Test Harness

XSLT App Engine 测试工具

Other than that, there's an incomplete Xerces extension which implements XPath 2.0:

除此之外,还有一个不完整的 Xerces 扩展,它实现了 XPath 2.0:

Xerces XPath 2.0 Extension

Xerces XPath 2.0 扩展

An Eclipse extension which implements XPath 2.0:

一个实现 XPath 2.0 的 Eclipse 扩展:

WTP XPath2.0 Processor

WTP XPath2.0 处理器

An incomplete Xalan-J branch which partially implements XSLT 2.0:

部分实现 XSLT 2.0 的不完整 Xalan-J 分支:

Some prototype work for XSLT 2.0 support in the Xalan-J Interpretive processor went on in 2003, but then trailed off. That prototype work is still available on the xslt20 branch http://svn.apache.org/repos/asf/xalan/java/branches/xslt20/, but since then nobdy has stepped forward to carry on that initial prototyping, and the Xalan PMC hasn't put in place any plans for XSLT 2.0 support.

Xalan-J Interpretive 处理器中 XSLT 2.0 支持的一些原型工作在 2003 年继续进行,但后来停止了。该原型工作仍然在 xslt20 分支http://svn.apache.org/repos/asf/xalan/java/branches/xslt20/上可用 ,但从那时起,nobdy 已经开始进行最初的原型设计,而 Xalan PMC 没有为 XSLT 2.0 支持制定任何计划。

As well as a server-side implementation of Saxon-CEwhich can run on Nashorn/Avatar.js:

以及可以在Nashorn/Avatar.js上运行的Saxon-CE的服务器端实现:

xslty

xslty

References

参考

回答by otto.poellath

Yes, I'm answering my own question from 2.5 years ago:

是的,我正在回答 2.5 年前我自己的问题:

I haven't tried it yet, but I just stumbled upon Eclipse PsychoPath, which is (according to the docs) a XPath 2.0 XML Schema Aware processor that passes 96% of the XPath 2.0 test suite (version 1.1M1).

我还没有尝试过,但我偶然发现了Eclipse PsychoPath,它是(根据文档)一个 XPath 2.0 XML Schema Aware 处理器,它通过了 XPath 2.0 测试套件(版本 1.1M1)的 96%。

回答by otto.poellath

For the archive, there's also AltovaXML, the free-as-in-beer, schema-aware XSLT 2.0 engine used in XMLSpy etc.

对于存档,还有AltovaXML,XMLSpy 等中使用的免费啤酒、模式感知 XSLT 2.0 引擎。

Unfortunately, like XMLSpy, it's Windows only.

不幸的是,与 XMLSpy 一样,它仅适用于 Windows。

回答by stian

Are you sure you reallyneed a schema aware processor? It might help find errors in the stylesheets quicker but the cost might outweigh the benefit (both in terms of money, and license-wise).

你确定你真的需要一个模式感知处理器吗?它可能有助于更快地找到样式表中的错误,但成本可能会超过收益(在金钱和许可方面)。

Saxon-SA is the schema-aware version of Saxon B. It includes the open source Saxon B in full (published under the Mozilla Public License). It's only the "schema-aware" stuff which is closed source, so most of it is still free software (though only as in free speech..).

Saxon-SA 是 Saxon B 的模式感知版本。它包含完整的开源 Saxon B(在 Mozilla 公共许可证下发布)。它只是闭源的“模式感知”的东西,所以大部分仍然是自由软件(尽管只是在言论自由中......)。