Schematron validation: how to improve error reports?

Post here questions and problems related to oXygen frameworks/document types.
Pascale
Posts: 40
Joined: Wed Jan 29, 2014 4:30 pm

Schematron validation: how to improve error reports?

Post by Pascale »

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

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>
the error message is displayed as

Code: Select all

Element abstractrepeat cannot be used more than once. ($repeats < 2) [assert]
however I want to only show

Code: Select all

Element abstractrepeat cannot be used more than once.
Thanks for your help,
Pascale
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Schematron validation: how to improve error reports?

Post by radu_pisoi »

Hi,
- 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.
For grouping the rules defined in one or more patterns you can use the phase element. This element is defined in ISO Schematron specification, http://www.schematron.com/iso/P8.html#GEN12. When validating an XML document against a Schematron schema that defines one or more phases an input dialog will be displayed allowing the user to choose one of defined phase.
Is this enough for you or do you have another use case?
- hide the XPath expression used in the rule, and display only the defined error message.
This improvement is already available in oXygen 15.2 version.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply