Schematron check

Post here questions and problems related to editing and publishing DITA content.
odurand47
Posts: 6
Joined: Tue Feb 04, 2020 10:16 am

Schematron check

Post by odurand47 »

Greetings!
Our current Schematron rules work well for validating the active document, but we want to extend the check to cover the entire bookmap and its files.
While the "DITA Map Completeness Check" is an acceptable solution, we're looking for a way to prefill the "Additional Schematron checks" field with the path of our Schematron rules file for all users (currently, each user must adjust this setting individually, which increases the likelihood of errors).
2023-11-21 15_37_02-DITA Map Completeness Check.png
2023-11-21 15_37_02-DITA Map Completeness Check.png (29.69 KiB) Viewed 385 times
Or maybe creating a plugin that launches a schematron check for all files in the current map is possible . We're open to any ideas on how to enforce schematron rule checks for all Oxygen users in our team.
Thank you for your input.
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Schematron check

Post by Radu »

Hi,
So:
(1)
Our current Schematron rules work well for validating the active document, but we want to extend the check to cover the entire bookmap and its files.
How did you accomplish this? Did you create a DITA framework extension which adds an extra Schematron validation stage?
https://blog.oxygenxml.com/topics/shari ... rules.html
If not, you should consider doing this as a DITA framework extension can later be shared with all others.

(2)
While the "DITA Map Completeness Check" is an acceptable solution, we're looking for a way to prefill the "Additional Schematron checks" field with the path of our Schematron rules file for all users (currently, each user must adjust this setting individually, which increases the likelihood of errors).
Looking at the settings you have in the "DITA Map Completeness Check" dialog, the setting "Batch validate referenced DITA resources" is already checked. This means that Oxygen would validate each file as if it would be opened in Oxygen and validated. This slows down the entire validation process but as a pleasant side effect should apply the Schematron check on each of the files if you have already done (1). So this would mean you no longer need to add a reference to the Schematron schema in the validation dialog.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
odurand47
Posts: 6
Joined: Tue Feb 04, 2020 10:16 am

Re: Schematron check

Post by odurand47 »

For (1) as you said we've created a DITA framework extension that includes an extra Schematron validation stage, making it simple to deploy to other users.
For (2), I appreciate the clarification on the "Batch validate referenced DITA resources" feature, which works as you described. I'm wondering if it's feasible to create a plugin that adds a button to the GUI, allowing users to launch a "DITA Map Completeness Check" with our .sch file linked in "Additional Schematron checks" and no other options selected. This would enable us to enforce our schematron rules across all documents in the ditamap with just one click, while still allowing users to freely adjust the settings of the standard "DITA Map Completeness Check". Do you know if this is possible?
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Schematron check

Post by Radu »

Hi,
For (1) as you said we've created a DITA framework extension that includes an extra Schematron validation stage, making it simple to deploy to other users.
Great!
For (2), I appreciate the clarification on the "Batch validate referenced DITA resources" feature, which works as you described.
Great!
I'm wondering if it's feasible to create a plugin that adds a button to the GUI, allowing users to launch a "DITA Map Completeness Check" with our .sch file linked in "Additional Schematron checks" and no other options selected.
The DITA Maps Manager's "Validate and check for completeness" action is actually a drop down action, so you can configure validation scenarios with a Validate and Check for Completeness stage:
https://www.oxygenxml.com/doc/versions/ ... ion-engine

There would also be the possibility for a Java based Oxygen plugin to invoke a specific validation scenario (which could be defined in a framework extension) for a certain opened editor.
This would enable us to enforce our schematron rules across all documents in the ditamap with just one click, while still allowing users to freely adjust the settings of the standard "DITA Map Completeness Check". Do you know if this is possible?
The ideal enforcement comes from automatic validation which you already have. If the writers ignore the automatic validation what makes you consider they will press a validate button before they check in the contents?
What kind of version control system are you using? A CMS or Git?
An alternative would be to maybe run some server side validation after content is modified...
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply