Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for saxon 9 b #79

Open
magwas opened this issue Apr 14, 2016 · 3 comments
Open

support for saxon 9 b #79

magwas opened this issue Apr 14, 2016 · 3 comments

Comments

@magwas
Copy link

magwas commented Apr 14, 2016

It would be nice to have support for saxon 9 b, for two reasons:

  • it is open source
  • it supports some second order functions, most importantly saxon:evaluate (with which xspec code would also be simpler)

As a workaround I have figured out that the following script as "saxon" works, with sacrifying coverage support (it just forgets the first three parameters, and I have saxon 9 b at ~/lib/saxon9.jar):

$ cat bin/saxon
#!/bin/bash
echo "this saxon script is specially crafted to make xpspec able to use saxon 9 b"
shift
shift
shift
java -cp /usr/share/java/tagsoup-1.2.1.jar -jar ~/lib/saxon9.jar ${*} targetdir=$PWD

@cirulls
Copy link

cirulls commented Apr 15, 2016

Hi Árpád,

thanks for providing some sample code for integration, that's always useful.

As far as I can read on the Saxon official page, Saxon-B is an older product (bold is mine):

Saxon-HE does not offer all the capabilities that were present in Saxon-B. Most notably, support for Saxon extension functions and other extensions was dropped, as was the capability for writing extension functions that rely on dynamic loading of Java or .NET code (a new facility for "integrated extension functions" is however available). Users whose code relies on these features of Saxon-B should either purchase the Professional Edition product or stick with Saxon-B: the latest release of Saxon-B is 9.1.0.8, and although there are no plans to develop it further or maintain it, it will remain available indefinitely.

I don't know if it helps, but I wonder if it is possible to achieve what you're doing with extension functions. This page describes how to write extension functions using Saxon 9.2 or better: http://www.saxonica.com/html/documentation/extensibility/integratedfunctions/). Alternatively XSLT 3.0 supports higher-order functions and xls:evaluate which is similar to saxon:evalute. However, XSLT 3.0 currently requires Saxon-PE or Saxon-EE which both need a license.

I can see how easy it is to extend the shell and batch scripts to support Saxon-B but you need to bear in mind that you're using an older product that is not maintained any more.

Sandro

@magwas
Copy link
Author

magwas commented Apr 15, 2016

Dear Sandro,

As far as I understand, extension functions and XSLT 3.0 are only supported by the PE or EE edition. Both of them closed source. I am writing open source software, so cannot and do not want to depend on closed source ones.

There are saxon-b variants still maintained (I am not the only one in the situation above). Actually the provided script is driving the https://github.com/orbeon/saxon variant for me.

@cirulls
Copy link

cirulls commented Aug 17, 2016

Hi @magwas,

I submitted a pull request to add support for Saxon B (#82), could you check if it would fix this issue?

Regarding code coverage, this is currently broken also for SaxonHE and SaxonEE/PE, I submitted another pull request to fix it (#80) but it is unlikely that it is going to work for Saxon B as it requires Saxon extension functions.

I hope this can help maintaining your open source projects.

Sandro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants