Message type for Schematron validation

Having trouble installing Oxygen? Got a bug to report? Post it all here.
jelovirt
Posts: 84
Joined: Tue Oct 11, 2005 9:17 am
Location: Helsinki, Finland
Contact:

Message type for Schematron validation

Post 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.
jelovirt
Posts: 84
Joined: Tue Oct 11, 2005 9:17 am
Location: Helsinki, Finland
Contact:

Re: Message type for Schematron validation

Post by jelovirt »

Noticed that the logic is pretty simple: assert creates errors, report creates warnings.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Message type for Schematron validation

Post 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
George Cristian Bina
jelovirt
Posts: 84
Joined: Tue Oct 11, 2005 9:17 am
Location: Helsinki, Finland
Contact:

Re: Message type for Schematron validation

Post 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.
jelovirt
Posts: 84
Joined: Tue Oct 11, 2005 9:17 am
Location: Helsinki, Finland
Contact:

Re: Message type for Schematron validation

Post 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.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Message type for Schematron validation

Post 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
George Cristian Bina
Post Reply