Schematron test does not work as expected
Posted: Mon Feb 04, 2019 6:06 pm
I am trying to set up some Schematron tests for our DITA documentation, and I am new to Schematron.
I want the validation to report an error for draft-comment elements whose translation attribute has not been explicitly set to no.
This is my pattern:
The pattern works as expected if my DITA topic contains the translate attribute with a value of yes or no.
However, if the translate attribute is not set at all, nothing is reported. I would expect an error or warning in this case.
Is this error or warning not issued because no is the default value according to the DITA specification?
Our translation tool is not aware of these default values.
Thank you for any help
Susanne
I want the validation to report an error for draft-comment elements whose translation attribute has not been explicitly set to no.
This is my pattern:
Code: Select all
<pattern id="not_excluded_from_translation">
<rule context="draft-comment">
<assert test="@translate='no'">attribute translate must be set to no for draft-comment element</assert>
</rule>
</pattern>
However, if the translate attribute is not set at all, nothing is reported. I would expect an error or warning in this case.
Is this error or warning not issued because no is the default value according to the DITA specification?
Our translation tool is not aware of these default values.
Thank you for any help
Susanne