Errors not reported when validating XSL using Saxon EE anda configuration file
If I try to validate the attached file "test-xsl-validation.xsl" using Saxon EE and a EE configuration file (saxonEEConfig.xml), no errors are reported. If I use Saxon PE and a PE configuration file (saxonPEConfig.xml), the error are reported correctly. I attached a zip with some sample files and the Java code to reproduce the problem. I tested with Saxon 184.108.40.206.
#2 Updated by Michael Kay about 1 year ago
The reason no errors are being reported is that JIT template compilation is enabled for the Saxon-EE case.
This can be disabled by using the configuration file:
<configuration edition="EE" xmlns="http://saxon.sf.net/ns/configuration"> <global optimizationLevel="-j"/> </configuration>
(though oXygen 21.0 objects to this, saying
optimizationLevel must be an integer).
I tried adding
but this has no effect. It seems when the compilation is done using JAXP, the default XsltCompilerInfo held in the Configuration is not used; instead the JIT option is taken from Configuration.isJITEnabled() which it turn takes it from the optimizer options set at configuration level.
What does work is to call
There's one other oddity about this program, namely that it is creating a ProfessionalTransformerFactory over an EnterpriseConfiguration. I thought that might be the cause of the trouble, but in fact it seems to work just fine, though I'm not sure the effects are predictable, and we possibly ought to prevent it.
#5 Updated by Octavian Nadolu 12 months ago
Thanks for your response. The "JIT compilation" is disabled automatically in Oxygen for validation, but only when the Saxon options are set from Oxygen. If the user adds its configuration file, we do not change its settings. We will try to disable "JIT compilation" for validation, also when a Saxon EE configuration file is set.
Please register to edit this issue