Topics

Schematron rules for shortdesc glossary issue #shortdesc

Nicholas Mucks
 

Hello,


We are developing Schematron rules for our organization. This rule identifies when a topic is missing a shortdesc:


    <pattern>
        <rule id="R_008" context="*[contains(@class, ' topic/topic ')]">
            <assert test="shortdesc" role="error">Rule008: The short description is missing. </assert>
        </rule>
    </pattern>


The rule works well except for on glossary topics because the error still appears even though glossary topics do not have a short description. 


Any thoughts on better writing this Schematron rule to exclude glossary topics?


Thanks!

- Nick


Bob Thomas
 

Try this:

<pattern>
  <rule id="R_008" context="*[contains(@class, ' topic/topic ') and not(contains(@class, ' glossentry/glossentry '))]">
    <assert test="shortdesc" role="error">Rule008: The short description is missing. </assert>
  </rule>
</pattern>

Regards,
Bob Thomas
Tagsmiths, LLC