Oxygen Scripting

Oxygen general issues.
Srinarayan
Posts: 42
Joined: Tue Jun 08, 2021 3:27 pm

Oxygen Scripting

Post by Srinarayan »

Hi

We have some schematron rules and some DITA specific rules. Here https://github.com/AlexJitianu/svrl-to-sonar I can see your code that you are picking only 'failed asserts' for converting in svrl file. Some of our made rules even after being violated are considered success and are not included in svrl file, as a result our end JSON file is coming out to be empty. Is there some constraint that only DITA rules on failure will be considered for svrl file?

Can we change the code to include success-asserts as well?

Regards
Srinarayan
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Oxygen Scripting

Post by alex_jitianu »

Hi,

I'm afraid I need more details on this. These DITA specific rules, are they also Schematron rules? Can you send us some sample SVRLs on support@oxygenxml.com with additional explanations?
As a side note, the processing done by this svrl-to-sonar project could also be replicated though an XSLT.

Best regards,
Alex
Srinarayan
Posts: 42
Joined: Tue Jun 08, 2021 3:27 pm

Re: Oxygen Scripting

Post by Srinarayan »

Hi Alex,

I have mailed the issue in detail to support@oxygenxml.com with subject line "Oxygen Scripting" from email ID srinarayan.00@wipro.com.

Regards
Srinarayan
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Oxygen Scripting

Post by alex_jitianu »

Hi,

It is just something we missed... When an assert activates/fails a <svrl:failed-assert> is generated, but when a report activates a a <svrl:successful-report> gets generated and we forgot to handle it.

Some possible solutions:

- if it is acceptable to change the report with an assert, then you could do that, of course....

- you can fork the https://github.com/AlexJitianu/svrl-to-sonar project and extend it to handle activated reports as well. If you do a Pull Request I'll be more than happy to accept it.

- instead of using the svrl-to-sonar project, you could just apply an XSLT over the SVRL and generate the sonar JSON. This is actually what I do for the Validate and Check for Completeness report [1] [2]. This means replacing this part:

Code: Select all

echo "Convert SVRL to SONAR"
java -jar bin/svrl-to-sonar.jar bin/tmp/paper.svrl > bin/tmp/sonar-schematron.json
with something similar to what it's done in validate-check-completeness.sh [1], for example:

Code: Select all

echo "Convert to Sonar"
java -cp bin/saxon9.jar net.sf.saxon.Transform -s:bin/tmp/paper.svrl -xsl:scripts/svrl-to-sonar.xsl > bin/tmp/sonar-schematron.json
The scripts/svrl-to-sonar.xsl XSLT should be similar with validatation-results-to-sonar.xsl [2].

Best regards,
Alex
Post Reply