diff --git a/validator/src/main/java/org/mustangproject/validator/XMLValidator.java b/validator/src/main/java/org/mustangproject/validator/XMLValidator.java
index abe94216..4392448e 100644
--- a/validator/src/main/java/org/mustangproject/validator/XMLValidator.java
+++ b/validator/src/main/java/org/mustangproject/validator/XMLValidator.java
@@ -419,11 +419,16 @@ public class XMLValidator extends Validator {
* @param xml the xml to be checked
* @param xsltFilename the filename of the intermediate XSLT file
* @param section the error type code, if one arises
- * @param severity how serious a error should be treated - may only be notice
+ * @param defaultSeverity how serious a error should be treated - may only be notice
* @throws IrrecoverableValidationError if anything happened that prevents further checks
*/
- public void validateSchematron(String xml, String xsltFilename, int section, ESeverity severity) throws IrrecoverableValidationError {
+ public void validateSchematron(String xml, String xsltFilename, int section, ESeverity defaultSeverity) throws IrrecoverableValidationError {
ISchematronResource aResSCH = null;
+ ESeverity severity=defaultSeverity;
+ if (defaultSeverity!=ESeverity.notice) {
+ severity=ESeverity.error;
+ }
+
aResSCH = SchematronResourceXSLT.fromClassPath(xsltFilename);
if (aResSCH != null) {
@@ -465,6 +470,16 @@ public class XMLValidator extends Validator {
thisFailLocation = currentFailNode.getAttributes().getNamedItem("location").getNodeValue();
}
+ if (currentFailNode.getAttributes().getNamedItem("flag") != null) {
+ // the XR issues warnings with flag=warning
+ if (currentFailNode.getAttributes().getNamedItem("flag").getNodeValue().equals("warning")) {
+ if (defaultSeverity!=ESeverity.notice) {
+ severity=ESeverity.warning;
+ }
+ }
+
+ }
+
NodeList failChilds = currentFailNode.getChildNodes();
for (int failChildIndex = 0; failChildIndex < failChilds.getLength(); failChildIndex++) {
if (failChilds.item(failChildIndex).getLocalName() != null) {
diff --git a/validator/src/test/resources/invalidXRV30.xml b/validator/src/test/resources/invalidXRV30.xml
index 6b62123d..0aa3b42c 100644
--- a/validator/src/test/resources/invalidXRV30.xml
+++ b/validator/src/test/resources/invalidXRV30.xml
@@ -115,9 +115,6 @@
[Seller city]
DE
-
- seller@email.de
-
DE 123456789