Custom XSLT validation

Here should go questions about transforming XML with XSLT and FOP.
Oleksii
Posts: 81
Joined: Wed Jul 19, 2017 6:04 pm
Location: Austria
Contact:

Custom XSLT validation

Post by Oleksii »

Hi,

I use oXygen 22.1 with bundled Saxon 9.9, but our web project uses Saxon 9.5.1.1 for XML transformations with XSLT 2. Therefore, I need this engine .

I've already configured a custom transformation engine as explained here: post27103.html?hilit=custom%20saxon%20v ... ine#p27103
So, I am able to apply XML transformation with XSLT 2 using Saxon 9.5 HE.
Next, I tried to associate custom validation for XSLT with this engine.
I followed this intruction: https://www.oxygenxml.com/doc/versions ... ation.html
But I'm not sure what should I put in the fields for the
command line arguments for detected schemas

and in the Document Validation >> Custom validation Engines I cannot see how it configured for Saxon EE as it does not opens as the other does.

Also I'm not sure with which schema I should validate my XSLT 2 and if I have download any custom schema for Saxon 9.5.
--
In other post: post16772.html?hilit=custom%20saxon%20v ... ine#p16772
they say:
Note that the <Default engine> is the engine determined from the associated transformation scenario(if one exists) or one of the default engines mentioned above depending on the XSLT version.
But I transform XML with XSLT so the transformation scenario is configured for XML. How and which transformation scenario can I configure for XSLT, and if it indeed enough to apply validation with the custom engine?

Is it still the case that for debugging no custom engines can be configured?

Thank you!
Kind regards,
Oleksii Sapov-Erlinger
teo
Posts: 57
Joined: Wed Aug 30, 2017 3:56 pm

Re: Custom XSLT validation

Post by teo »

Hi Oleksii,

It looks like we really have problems setting up these custom Saxon based validation engines.
First, it's quite difficult to cofigure them (for average users, at least).
Second, even if configured eventually, the custom validation engine is not properly considered by Oxygen suite.

In your case, starting from the Saxon jar, the command would be:
java -cp path\to\saxon95.jar com.saxonica.Validate
followed by the validation arguments, specified in the Saxon documentation:
https://www.saxonica.com/documentation9 ... dline.html

The problem is that any command line error in such a custom validation engine is ignored by Oxygen and you always get a "Validation Successful" message.
The issue was already logged in our internal issue tracker a few months ago.
I will add a link to this forum thread there, and I will raise the issue's priority.
I will come back with details related to solving the problem in question.

Best regards,
Teo
Teodor Timplaru
<oXygen/> XML Editor
http://www.oxygenxml.com
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Custom XSLT validation

Post by adrian »

Hi,

What my colleague provided is for validation of XML against a schema.
For validation of XSLT there is a problem to achieve the same because Saxon 9.4 and later have dropped the compile stylesheet facility for the command line.
This was possible in Saxon 9.2 and probably 9.3 via:

Code: Select all

java -cp path\to\saxon9.jar com.saxonica.CompileStylesheet   [options]   stylesheet   output   [ params...] 
So, to keep a long story short, if you need Saxon 9.5 for everything (validation, transformation, debugging), it's much simpler to just download Oxygen 16.1 which bundled Saxon 9.5.1.7 or Oxygen 15.2 which bundled Saxon 9.5.1.3.
While they are no longer maintained or supported, they can still be used with the same license key you have and at least on Windows they should still work fine to get the work done.
If you are interested in this possibility, please write to our support email address (support@oxygenxml.com) and request the version and platform (Windows, Linux, etc) for which you need it.
Oleksii wrote: Fri Aug 12, 2022 10:09 am and in the Document Validation >> Custom validation Engines I cannot see how it configured for Saxon EE as it does not opens as the other does.
"Saxon-EE" that you see there pre-configured in the Custom Validation Engines is actually controlled via Java API, so it's not possible to replicate that configuration for a command line validation engine.
Also I'm not sure with which schema I should validate my XSLT 2 and if I have download any custom schema for Saxon 9.5.
AFAIK there is no schema for XSLT 2 validation. Compiling a stylesheet is the proper way to validate it.
In other post: post16772.html?hilit=custom%20saxon%20v ... ine#p16772
they say:
Note that the <Default engine> is the engine determined from the associated transformation scenario(if one exists) or one of the default engines mentioned above depending on the XSLT version.
But I transform XML with XSLT so the transformation scenario is configured for XML. How and which transformation scenario can I configure for XSLT, and if it indeed enough to apply validation with the custom engine?
That refers to built-in engines. When you configure a transformation scenario for an XSLT file with a specific (built-in) XSLT engine, Oxygen will automatically use the same engine specified in that scenario for default validation of that XSLT file.
Is it still the case that for debugging no custom engines can be configured?
It's just not possible. The debugger needs Java API that a custom engine cannot provide. Even for Saxon the API has changed significantly that we have not been able to uphold debugger compatibility with older versions. As mentioned above, if you need to debug with an older version of Saxon, you can simply try with an older version of Oxygen that bundles that old version of Saxon.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Oleksii
Posts: 81
Joined: Wed Jul 19, 2017 6:04 pm
Location: Austria
Contact:

Re: Custom XSLT validation

Post by Oleksii »

Thank you for your replies!
I will try with an older version of oXygen as ssuggested.
Kind regards,
Oleksii Sapov-Erlinger
Post Reply