Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 61816ccd authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

xmlvalidator: in case the file to validate is not of a known schema, call the...

xmlvalidator: in case the file to validate is not of a known schema, call the validation callback with null as arguments.
parent ca17537d
Branches
Tags
No related merge requests found
......@@ -84,6 +84,7 @@ namespace TUGraz.VectoCore.Utils
if (_doc.SchemaInfo.Validity != XmlSchemaValidity.Valid || _doc.DocumentElement?.SchemaInfo == null ||
_doc.DocumentElement.SchemaInfo.SchemaType == null) {
ValidationCallBack(null, null);
_valid = false;
}
......@@ -94,7 +95,7 @@ namespace TUGraz.VectoCore.Utils
{
_resultAction(false);
_valid = false;
_validationErrorAction(args.Severity, new ValidationEvent { ValidationEventArgs = args });
_validationErrorAction(args?.Severity ?? XmlSeverityType.Error, new ValidationEvent { ValidationEventArgs = args });
}
public static void CallBackExceptionOnError(XmlSeverityType severity, ValidationEvent evt)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment