Page 1 of 1
Use terminology checker to flag missing short description
Posted: Tue Apr 04, 2023 10:23 pm
by Jeff_Reynolds
Hello!
I have been having rollicking success creating rules with the terminology checker add-on. I was wondering if the tool can support a check for the short description element and throw a warning if it is not present in the topic. If so, how would one code that?
Maybe time to learn schematron?
Re: Use terminology checker to flag missing short description
Posted: Wed Apr 05, 2023 7:00 am
by Radu
Hi Jeff,
The term checker checks only text content, it does not check structure.
If you want structure checks, then indeed you would need Schematron.
https://blog.oxygenxml.com/topics/shari ... rules.html
A Schematron file doing what you want would probably look something like this:
Code: Select all
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<pattern>
<rule context="topic">
<assert test="shortdesc">Short description is missing</assert>
</rule>
</pattern>
</schema>
As a hint you can also try to use ChatGPT to generate Schematron patterns or entire schemas, for example give a prompt like:
generate an ISO schematron which reports an error if the short description element is missing from a DITA XML topic. DITA XML topics are in no namespace.
ChatGPT may generate an invalid Schematron schema which needs to be corrected in Oxygen afterwards but it gives you something to start with.
Regards,
Radu