Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -1057,10 +1057,23 @@ function xml_validate_jing()
function xml_validate_libxml( $dom )
{
echo "Validating temp/manual.xml (libxml)... ";
$ok = $dom->relaxNGValidate( RNG_SCHEMA_FILE );

if ( $dom->relaxNGValidate( RNG_SCHEMA_FILE ) )
if ( ! $ok && $GLOBALS['ac']['LANG'] != 'en' )
{
$errors = libxml_get_errors();
$warnings = 0;
foreach( $errors as $error )
if ( str_contains( $error->message , 'IDREF attribute' ) )
$warnings++;
if ( count( $errors ) == $warnings )
$ok = true;
}

if ( $ok )
{
echo "done.\n";
print_xml_errors();
}
else
{
Expand Down