-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
[feature] Allow Saxon licensed editions (EE and PE) #4854
[feature] Allow Saxon licensed editions (EE and PE) #4854
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice Feature! Please have a look at the Codacy output and the exported names.
I also do wonder how this change affects the runtime of fn:transform
.
I hope the constructor of this function does only run once and then reuses the static context and configuration within on each call. Is that the case?
exist-core/src/main/java/org/exist/util/SaxonConfigurationHolder.java
Outdated
Show resolved
Hide resolved
exist-core/src/main/java/org/exist/util/SaxonConfigurationHolder.java
Outdated
Show resolved
Hide resolved
exist-core/src/main/java/org/exist/util/SaxonConfigurationHolder.java
Outdated
Show resolved
Hide resolved
exist-core/src/main/java/org/exist/util/SaxonConfigurationHolder.java
Outdated
Show resolved
Hide resolved
@alanpaxton The commit messages do not conform to our commit message format. They must start with either |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for going the extra-mile @alanpaxton !
@alanpaxton Can you rename your commits to match the commit message format? |
2824238
to
71955d4
Compare
Having learned that it was possible to use Saxon PE and EE up until 6.0.1 I see this as a fix of a regression. I believe this warrants a backport to develop-6.x.x |
@line-o EB won't be backporting this at this time, but anyone else is free to do so |
@alanpaxton I believe, @adamretter would like the work in progress commit bc8d9ce to be cleaned from the history before it gets merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor issues, and one question about the design of the config holder class.
Because of a bug in Saxon 9.9 that has been fixed only for version 10+ it is not possible to integrate Saxon-PE, only Saxon-EE. See corresponding Saxon bug: https://saxonica.plan.io/issues/4849 I'm not sure whether this bug will be ever fixed in 9.9. Are there any plans/estimates to use Saxon 10/11 in exist-db? |
Set up to configure Saxon with a license for PE/EE if we find such a license, assume at that point that PE/EE has been manually installed. WIP - not fully tested, UT or manually, and we need manual testing after installing EE to confirm that we can get the features we want. [fix] Remove licence file stuff, comment code There is no point in us pushing a licence file into Saxon from a different place, because as soon as we ask Saxon to load a configuration it looks for a licence file. We will just ask to dump a licence file where Saxon expects it by default. Comment the methods in the configuration holder.
The saxon-config.xml file we supply does nothing, it just acts as a placeholder for a fully-realised saxon-config.xml when a licensed Saxon edition is installed.
Instructions in markdown for how to achieve this.
Saxon config tests that we find the saxon config file; the part about looking for a license file is not implemented.
De-genericize static names Don’t capitalize static method Remove unused imports Unpick method for complexity metric Re-order some qualifiers Make markdown conform to checker rules
We don’t need a map of broker pool to saxon config, I’m not sure why we made it like that in the first place. Broker pool just needs a (lazy) reference to its own saxon configuration (wrapper).
71955d4
to
9772b00
Compare
I had a look at upgrading to 11 when I started this, but saxon has changed the regex code which we fork as a separate repo and include in exist, so there's some quantity more work involved to update and resolve that conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the review comments - LGTM :-)
SonarCloud Quality Gate failed. |
@line-o Can this be merged now then? |
Description:
conf.xml
.SaxonConfigurationHolder
class used by the broker pool to search for and fetch the Saxon configuration referenced byconf.xml
and load it into Saxon. The holder holds the saxon configuration lazily, loads it on first request, and retains the same configuration to respond to subsequent requests with.fn:transform()
(which uses Saxon as its transformer) can make use of EE and/or PE features.Reference:
Closes #4813
Type of tests:
fn:transform()
script in eXide. Logging by the configuration holder of the result of querying capabilities of the resulting Saxon processor verified that the running version of Saxon provided all licensed features.