Closed costas80 closed 7 months ago
Thanks for ponting that out. Also the reference to the intended error levels is very interesting. As the Schematron documentation may not be there forever, I am taking the liberty of copying the table over:
@role="FATAL" – something so bad that processing or validation should or did stop.
LSP Error
ISQB S1 CRITICAL
@role="ERROR" – something wrong has occurred but processing may continue
LSP Error
ISQB S2 MAJOR
@role="WARN" – something wrong has happened, but it does not necessarily require action
LSP Warning
ISQB S3 MINOR
@role="CAUTION" – It may not be wrong, but care is required. Or a system might be expected to process the document in a special way because of this.
LSP Information
ISQB S4 TRIVIAL
@role="INFO" – some information is being reported
LSP Information
@role="HINT" – some hint is being given to the user
LSP Hint
@role="TRACE" – some information on execution is being reported.
LSP Information
@role="DEBUG" – some information that is not intended for exposure in production.
LSP Hint
Will be part of the next 8.0.1 release. If it is okay for you, I won't build an immediate release...
Thanks for the fast reaction @phax ! No problem to wait for 8.0.1. As you already expose the role
value on the resulting messages we can already check it and "force" an information level.
A failed assertion with a flag or role of
CAUTION
is currently considered as a warning. This comes from the implementation in classDefaultSVRLErrorLevelDeterminator
, and in particular methodgetDefaultErrorLevelFromString
:However, when referring to https://schematron.com/document/141.html there is a suggestion to treat "CAUTION" as "LSP information":
Is the current implementation of
DefaultSVRLErrorLevelDeterminator
incorrect in its handling ofCAUTION
assertions (i.e. should they be mapped instead toEErrorLevel.INFO
?I would debate that the current implementation is correct, but we have had certain of our users point out that it is not (we use the resulting error level to present findings as warnings or errors accordingly).
What is your opinion about this?