How do I get EXSLT support in Saxon-HE?

◇◆丶佛笑我妖孽 提交于 2019-12-22 04:42:38

问题


I have a bunch of XSLT files that I need to process against some XML files. I cannot change the XSLT files as they come from a 3rd party. The XSLT's are version 2.0.

I'm on Mac OS X 10.6 and it looks like Saxon-HE is the only XSLT 2.0 processor available.

Most of the XSLT's work fine, however, some give errors regarding missing functions, specifically month-in-year() and other date/time related functions.

According to http://www.saxonica.com/documentation/extensions/exslt.xml regarding EXSLT:

These extensions are available in Saxon-PE and Saxon-EE "out of the box". They are not available in Saxon-HE

Is there anyway that I can use the EXSLT functions with Saxon-HE?

I'm happy to move to another tool/processor if that would work.


回答1:


Saxon-B 9.1 will remain available for people with this kind of requirement. 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.




回答2:


Saxon9 HE does not have the EXSLT extension. 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. That said, with Saxon9 HE and XSLT 2.0, why do you need EXSLT?

Okay, should have read your post before replying. The requirement seems to be:

  • XSLT 2.0
  • EXSLT
  • cannot change the XSLT

If this is all to be assumed, it looks like that leaves you with Saxon9 PE or EE. (Well, or Saxon 9.1, of course.)




回答3:


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.



来源:https://stackoverflow.com/questions/5897664/how-do-i-get-exslt-support-in-saxon-he

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