Skip to content

Commit

Permalink
Add support for info severity
Browse files Browse the repository at this point in the history
  • Loading branch information
hubgit committed Sep 6, 2024
1 parent 103e59d commit 6eb1a32
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions functions/schematron.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function validate_schematron($inputFile, $schematron) {

$errors = [];
$warnings = [];
$infos = [];
// $recoverableErrors = [];

$inputDoc = new DOMDocument();
Expand Down Expand Up @@ -57,6 +58,10 @@ function validate_schematron($inputFile, $schematron) {
$errors[] = $data;
break;

case 'info':
$infos[] = $data;
break;

case 'warning':
default:
$warnings[] = $data;
Expand Down Expand Up @@ -85,6 +90,10 @@ function validate_schematron($inputFile, $schematron) {
$errors[] = $data;
break;

case 'info':
$infos[] = $data;
break;

case 'warning':
default:
$warnings[] = $data;
Expand All @@ -99,6 +108,7 @@ function validate_schematron($inputFile, $schematron) {
return [
'results' => [
'errors' => $errors,
'infos' => $infos,
'warnings' => $warnings,
]
];
Expand Down

0 comments on commit 6eb1a32

Please sign in to comment.