Able to Reference Multiple Schematron Files in Configure validation engine?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
dreifsnider
Posts: 105
Joined: Thu Aug 30, 2018 10:06 pm

Able to Reference Multiple Schematron Files in Configure validation engine?

Post by dreifsnider »

Hi,

Is it possible to reference multiple Schematron files in the Additional Schematron checks field in the Configure validation engine dialog?
editor-configure-validation-engine.png
editor-configure-validation-engine.png (17.47 KiB) Viewed 501 times
I've attempted to use both comma-separated and semi-colon separated, but neither worked.

If not, is there another way to enable the Batch validate reference DITA resources when running multiple Schematron files? I was able to run each Schematron file in the same validation scenario; however, I had to use two DITA Map Validation and Completeness Check calls, one for each Schematron file. This resulted in the DITA Map Validation and Completeness Check being ran twice, essentially doubling the length of the validation scenario.

Context: My team has two Schematron files to check terminology: one for errors and one for warnings. We don't want to combine these Schematron files into one file, because each one is built and managed separately.

We want to be able to run each Schematron file against all referenced DITA topics in a DITA map; essentially batch checking the terminology of all topics that are used using multiple Schematron files.

Thanks!

Daniel
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Able to Reference Multiple Schematron Files in Configure validation engine?

Post by chrispitude »

Hi Daniel

One way would be to create a top-level wrapper file that uses <sch:extends> to include the lower-level files, as described here:

Multi-file Schematron architecture

Another approach is to create a DITA framework extension, then add each relevant Schematron file to the Validation tab list. This also allows you to configure files for each file type (topics, maps, etc.).

I used the second approach. If you've never extended a framework, I can help you with it.
dreifsnider
Posts: 105
Joined: Thu Aug 30, 2018 10:06 pm

Re: Able to Reference Multiple Schematron Files in Configure validation engine?

Post by dreifsnider »

Hi Chris,

Thanks for your reply and for the information about <sch:extends>! Schematron documentation can be rather difficult to find and I probably wouldn't have found about this otherwise.

I'm currently using custom frameworks to provide different validation and transformation scenarios for DITA Maps and DITA Topics. As for the validation scenarios for DITA Maps, the only way I've found to get a Schematron to run for all referenced topics is to include it as part of the DITA Map Validation and Completeness Check Engine step, ensuring the Batch validate... option is selected:
editor-dita-maps-framework-validation-scenario.png
editor-dita-maps-framework-validation-scenario.png (78.44 KiB) Viewed 463 times
Otherwise, when the Schematron is included in its own step it seems to only run for the DITA Map itself and for none of the referenced topics.

Thanks again!

Daniel
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Able to Reference Multiple Schematron Files in Configure validation engine?

Post by chrispitude »

Hi Daniel,

There is also a DITA (not DITA Map) framework that applies to .dita files instead of .ditamap files. If you extend it and add your Schematron checks there, you should get what you want.

Having separate control over map and topic validations is nice. We had separate sets of checks for each.
Post Reply