How do I get EXSLT support in Saxon-HE?
Asked Answered
G

3

7

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.

Groundsel answered 5/5, 2011 at 12:30 Comment(0)
P
6

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.

Passacaglia answered 5/5, 2011 at 14:24 Comment(1)
The download is available here: sourceforge.net/projects/saxon/files/Saxon-BGroundsel
H
1

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.)

Hamrnand answered 5/5, 2011 at 13:11 Comment(1)
Thank you. I've successfully used Saxon-B 9.1 :)Groundsel
M
0

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.

Marcie answered 5/5, 2011 at 14:48 Comment(2)
Thanks, yeah I saw that you could register external functions and I downloaded them from exslt.org but I couldn't figure out how to register them.Groundsel
I don't know if exslt.org has implementations for Saxon. See saxonica.com/documentation/extensibility/… for information on how to write and register your own extension functions in Saxon.Marcie

© 2022 - 2024 — McMap. All rights reserved.