简体   繁体   English

如何在 Saxon-HE 中获得 EXSLT 支持?

[英]How do I get EXSLT support in Saxon-HE?

I have a bunch of XSLT files that I need to process against some XML files.我有一堆 XSLT 文件,我需要针对一些 XML 文件进行处理。 I cannot change the XSLT files as they come from a 3rd party.我无法更改 XSLT 文件,因为它们来自第 3 方。 The XSLT's are version 2.0. XSLT 是 2.0 版。

I'm on Mac OS X 10.6 and it looks like Saxon-HE is the only XSLT 2.0 processor available.我在 Mac OS X 10.6 上,看起来Saxon-HE是唯一可用的 XSLT 2.0 处理器。

Most of the XSLT's work fine, however, some give errors regarding missing functions, specifically month-in-year() and other date/time related functions. XSLT 的大部分工作都很好,但是,有些函数会出现关于缺少函数的错误,特别是month-in-year()和其他与日期/时间相关的函数。

According to http://www.saxonica.com/documentation/extensions/exslt.xml regarding EXSLT:根据http://www.saxonica.com/documentation/extensions/exslt.xml关于 EXSLT:

These extensions are available in Saxon-PE and Saxon-EE "out of the box".这些扩展在“开箱即用”的 Saxon-PE 和 Saxon-EE 中可用。 They are not available in Saxon-HE它们在 Saxon-HE 中不可用

Is there anyway that I can use the EXSLT functions with Saxon-HE?无论如何,我可以在 Saxon-HE 中使用 EXSLT 功能吗?

I'm happy to move to another tool/processor if that would work.如果可行的话,我很高兴转向另一个工具/处理器。

Saxon-B 9.1 will remain available for people with this kind of requirement. Saxon-B 9.1 仍可供有此类要求的人使用。 There's very little need for the EXSLT extensions when you're using XSLT 2.0, but you do come across stylesheets that use them, and Saxon-B remains available for that purpose if you want to stick with open source software.当您使用 XSLT 2.0 时,几乎不需要 EXSLT 扩展,但您确实会遇到使用它们的样式表,如果您想坚持使用开源软件,Saxon-B 仍然可以用于此目的。

Saxon9 HE does not have the EXSLT extension. Saxon9 HE 没有 EXSLT 扩展。 In order to use EXSLT, you need to revert to Saxon 9.1 or pick a different product altogether, such as Xalan (Java) or MSXML (Windows) or LibXSLT (C and scripting), all of which only implement XSLT and XPath 1.0.要使用 EXSLT,您需要恢复到 Saxon 9.1 或完全选择不同的产品,例如 Xalan (Java) 或 MSXML (Windows) 或 LibXSLT(C 和脚本),所有这些都只实现 XSLT 和 XPath 1。 That said, with Saxon9 HE and XSLT 2.0, why do you need EXSLT?也就是说,对于 Saxon9 HE 和 XSLT 2.0,为什么需要 EXSLT?

Okay, should have read your post before replying.好的,应该在回复之前阅读您的帖子。 The requirement seems to be:要求似乎是:

  • XSLT 2.0 XSLT 2.0
  • EXSLT EXSLT
  • cannot change the XSLT无法更改 XSLT

If this is all to be assumed, it looks like that leaves you with Saxon9 PE or EE.如果这一切都是假设,那么看起来你只剩下 Saxon9 PE 或 EE。 (Well, or Saxon 9.1, of course.) (好吧,当然是撒克逊 9.1。)

Whatever processor you choose it doesn't have to natively support EXSLT functions, it just needs to be extensible so you can register your own functions, that way you can implement the EXSLT functions yourself.无论您选择哪种处理器,它都不必原生支持 EXSLT 函数,它只需要可扩展,以便您可以注册自己的函数,这样您就可以自己实现 EXSLT 函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM