Treat schematron rule flag "information" as notice.
XRechnung 3.0.3 Summer 2025 edition introduced a rule with
flag="information", breaking the Mustangproject validator which
doesn't expect such a flag value.
See
06be5b2c75
Explicitly mapping "information" to ESeverity.notice hopefully fixes
this and any future additions of rules with flag="information".
This commit is contained in:
@@ -536,12 +536,15 @@ public class XMLValidator extends Validator {
|
||||
}
|
||||
|
||||
ESeverity severity;
|
||||
Node failNode = currentFailNode.getAttributes().getNamedItem("flag");
|
||||
String failVal = failNode == null ? null : failNode.getNodeValue();
|
||||
if (defaultSeverity == ESeverity.notice) {
|
||||
severity = defaultSeverity;
|
||||
} else if (currentFailNode.getAttributes().getNamedItem("flag") != null
|
||||
&& "warning".equals(currentFailNode.getAttributes().getNamedItem("flag").getNodeValue())) {
|
||||
} else if ("warning".equals(failVal)) {
|
||||
// the XR issues warnings with flag=warning
|
||||
severity = ESeverity.warning;
|
||||
} else if ("information".equals(failVal)) {
|
||||
severity = ESeverity.notice;
|
||||
} else {
|
||||
severity = ESeverity.error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user