From 399538ecb5afc842c37414f663a830ff0e9fa832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Tue, 28 Jul 2026 11:18:04 -0300 Subject: [PATCH] Relax IDREF failures of libxml validation on translations --- configure.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/configure.php b/configure.php index 52255a0544..0c89f4b775 100755 --- a/configure.php +++ b/configure.php @@ -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 {