From 6eb1a329be7e6bbd2f0d59ec12b205fdda85a877 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Fri, 6 Sep 2024 20:04:36 +0100 Subject: [PATCH] Add support for info severity --- functions/schematron.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/functions/schematron.php b/functions/schematron.php index 54c56bd..2e32646 100644 --- a/functions/schematron.php +++ b/functions/schematron.php @@ -25,6 +25,7 @@ function validate_schematron($inputFile, $schematron) { $errors = []; $warnings = []; + $infos = []; // $recoverableErrors = []; $inputDoc = new DOMDocument(); @@ -57,6 +58,10 @@ function validate_schematron($inputFile, $schematron) { $errors[] = $data; break; + case 'info': + $infos[] = $data; + break; + case 'warning': default: $warnings[] = $data; @@ -85,6 +90,10 @@ function validate_schematron($inputFile, $schematron) { $errors[] = $data; break; + case 'info': + $infos[] = $data; + break; + case 'warning': default: $warnings[] = $data; @@ -99,6 +108,7 @@ function validate_schematron($inputFile, $schematron) { return [ 'results' => [ 'errors' => $errors, + 'infos' => $infos, 'warnings' => $warnings, ] ];