Schematron validation: how to improve error reports?
Posted: Wed Apr 16, 2014 5:30 pm
Hi,
I have included a validation scenario based on several schematron files for my custom DTD.
That works perfectly well, but I would like to know if it is possible to improve reporting by:
- defining a different category for each set of rules.
For example, I would like to group the errors related to metadata, and have another group for errors related to table contents.
- hide the XPath expression used in the rule, and display only the defined error message.
For example, if I have the following rule
the error message is displayed as
however I want to only show
Thanks for your help,
Pascale
I have included a validation scenario based on several schematron files for my custom DTD.
That works perfectly well, but I would like to know if it is possible to improve reporting by:
- defining a different category for each set of rules.
For example, I would like to group the errors related to metadata, and have another group for errors related to table contents.
- hide the XPath expression used in the rule, and display only the defined error message.
For example, if I have the following rule
Code: Select all
<rule context="abstractrepeat" role="error">
<let name="repeats" value="count(//abstractrepeat)" />
<assert test="$repeats < 2">Element abstractrepeat cannot be used more than once.</assert>
</rule>
Code: Select all
Element abstractrepeat cannot be used more than once. ($repeats < 2) [assert]
Code: Select all
Element abstractrepeat cannot be used more than once.
Pascale