Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
André L F S Bacci committed Dec 9, 2024
1 parent 6c821f4 commit b39ef12
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function print_xml_errors()
$clmn = $error->column;

if ( str_starts_with( $mssg , 'XPointer evaluation failed:' ) && ! $report )
continue; //
continue; // Translations can omit these, to focus on fatal errors

if ( str_starts_with( $file , $filePrefix ) )
$file = substr( $file , strlen( $filePrefix ) );
Expand All @@ -235,7 +235,7 @@ function print_xml_errors()
if ( str_starts_with( $file , $rootPrefix ) )
$file = substr( $file , strlen( $rootPrefix ) );

$prefix = $error->level === LIBXML_ERR_FATAL ? "FATAL" : "ERROR";
$prefix = $error->level === LIBXML_ERR_FATAL ? "FATAL" : "error";

fwrite( $output , "[$prefix $file {$line}:{$clmn}] {$mssg}\n" );
}
Expand Down Expand Up @@ -926,10 +926,7 @@ function dom_saveload( DOMDocument $dom , string $filename = "" )
$dom->save($mxml); // non idempotent, historical path
if ($dom->relaxNGValidate(RNG_SCHEMA_FILE)) {
echo "done.\n";
printf("\nAll good. Saving %s... ", basename($ac["OUTPUT_FILENAME"]));
$dom->save($mxml); // save it again... does validations changes somethnig?
echo "done.\n";
printf("\nAll good. Saved %s\n", basename($ac["OUTPUT_FILENAME"]));
echo "All you have to do now is run 'phd -d {$mxml}'\n";
echo "If the script hangs here, you can abort with ^C.\n";
echo <<<CAT
Expand Down

0 comments on commit b39ef12

Please sign in to comment.