Code development platform for open source projects from the European Union institutions

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
No related branches found
No related tags found
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.
Finish editing this message first!
Please register or to comment