You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output on the command line and the validation result documents diverge when there are schematron rules with role="warning" or when the configuration file sets a custom error level "warning" to a schematron rule.
I have attached a minimal example that reproduces the problem.
example.sch (please notice role="warning" for SCH-TEST-2):
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:pattern>
<sch:rule context="test" role="warn">
<sch:assert id="SCH-TEST-1" test="xs:integer(@a) gt 10">Value of 'a' must be greater than 10.</sch:assert>
<sch:assert id="SCH-TEST-2" test="xs:integer(@b) gt 10" role="warning">Value of 'b' should be greater than 10.</sch:assert>
<sch:assert id="SCH-TEST-3" test="xs:integer(@c) gt 10">Value of 'c' must be greater than 10.</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>
Tabular command line output wrongly says "reject" for all three example documents:
Validation result documents correctly say "reject", "accept" and "accept"
(rep:report/rep:assessment/rep:reject, rep:report/rep:assessment/rep:accept, rep:report/rep:assessment/rep:accept in results/example*.xml).
By default, the validator does not recognize the generated validation report (whose generation is configured as an XSLT skript). Hence, any XML schema violation and any failed schematron assertion (regardless of the severity) leads to "reject".
To make the validator recognize the actual assessment of the report (which considers severities and also custom level settings) one needs to add the following line to each scenario:
The output on the command line and the validation result documents diverge when there are schematron rules with role="warning" or when the configuration file sets a custom error level "warning" to a schematron rule.
I have attached a minimal example that reproduces the problem.
example.xsd:
example.sch (please notice
role="warning"
for SCH-TEST-2):scenarios.xml:
example1.xml:
example2.xml:
example3.xml:
Tabular command line output wrongly says "reject" for all three example documents:
Validation result documents correctly say "reject", "accept" and "accept"
(rep:report/rep:assessment/rep:reject, rep:report/rep:assessment/rep:accept, rep:report/rep:assessment/rep:accept in results/example*.xml).
Complete example attached
minimal-example.zip.
Reproduce as follows:
The text was updated successfully, but these errors were encountered: