Page 1 of 1

Able to Reference Multiple Schematron Files in Configure validation engine?

Posted: Tue Aug 15, 2023 5:12 am
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
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

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

Posted: Tue Aug 15, 2023 11:58 am
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.

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

Posted: Tue Aug 15, 2023 8:21 pm
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
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

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

Posted: Wed Aug 16, 2023 1:40 pm
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.