Page 1 of 1

Message type for Schematron validation

Posted: Mon Jun 08, 2009 11:20 am
by jelovirt
Oxygen 10.3 dev

When validating a document with an associated Schematron schema, how does Oxygen choose which message type (fatal, error, warning) the validation message is? Currently I have a schema where some messages are reported as error and other are warning, and I can't see the logic Oxygen uses.

Re: Message type for Schematron validation

Posted: Mon Jun 08, 2009 11:45 am
by jelovirt
Noticed that the logic is pretty simple: assert creates errors, report creates warnings.

Re: Message type for Schematron validation

Posted: Mon Jun 08, 2009 12:57 pm
by george
Hi Jarno,

That is exactly the logic behind errors/warnings for Schematron. FWIW the Schematron spec says for diagnostic:

http://www.schematron.com/iso/P8.html#GEN17
A natural-language message giving more specific details concerning a failed assertion, such as found versus expected values and repair hints.
Regards,
George

Re: Message type for Schematron validation

Posted: Mon Jun 08, 2009 1:48 pm
by jelovirt
Regards diagnostics, Oxygen currently shows only the diagnostics message if it is available, ignoring natural-language assertion in assert or report element. My reading of the spec is that diagnostics message is additional information and should not replace the natural-language assertion.

Re: Message type for Schematron validation

Posted: Mon Jun 08, 2009 1:57 pm
by jelovirt
My interpretation of the difference between assert and report element is that report just a negated assert [1]. The descriptions for them, respectively, are:
The natural-language assertion [of assert] shall be a positive statement of a constraint.
The natural-language assertion [of report] shall be a positive statement of a found pattern or a negative statement of a constraint.
Thus I think they should not be used to differentiate between errors and warnings. Instead, the role attribute could be used for that.

References:

[1] http://www.schematron.com/iso/P9.html#T42, step 4.

Re: Message type for Schematron validation

Posted: Tue Dec 01, 2009 10:17 pm
by george
Hi Jarno,

Please note that we changed the Schematron implementation to allow user control on the error level of the reports: fatal, error, warning, info. The full details are available here:

http://www.oxygenxml.com/pipermail/oxyg ... 02902.html

Best Regards,
George