Use terminology checker to flag missing short description
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 37
- Joined: Tue Apr 13, 2021 9:48 pm
Use terminology checker to flag missing short description
Post 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?
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?
-
- Posts: 9461
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Use terminology checker to flag missing short description
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:
As a hint you can also try to use ChatGPT to generate Schematron patterns or entire schemas, for example give a prompt like:
Regards,
Radu
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>
ChatGPT may generate an invalid Schematron schema which needs to be corrected in Oxygen afterwards but it gives you something to start with.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.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service