From b84b0f4b2d9e26185caa461ebb3b2b190e9413e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Tue, 3 Dec 2024 10:02:18 -0300 Subject: [PATCH 1/2] Document and complement XInclude failures as warnings on translations --- configure.php | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/configure.php b/configure.php index fa26ad285..076690de5 100755 --- a/configure.php +++ b/configure.php @@ -814,10 +814,16 @@ function getFileModificationHistory(): array { } } -{ # Automatic xi:include / xi:fallback fixups +if ( $ac['LANG'] != 'en' ) +{ + // XInclude failures are soft erros on translations, so replace + // residual XInclude tags on translations to keep then building. + + $explain = false; $xpath = new DOMXPath( $dom ); - $nodes = $xpath->query( "//*[local-name()='include']" ); + $xpath->registerNamespace( "xi" , "http://www.w3.org/2001/XInclude" ); + $nodes = $xpath->query( "//xi:include" ); foreach( $nodes as $node ) { $fixup = null; @@ -831,8 +837,15 @@ function getFileModificationHistory(): array { case "refsect1": $fixup = ""; break; + case "tbody": + $fixup = ""; + break; +// case "variablelist": +// $fixup = ">"; +// break; default: - echo "Unknown parent element, validation may fail: $tagName\n"; + echo "Unknown parent element at XInclude failure: $tagName\n"; + $explain = true; continue 2; } if ( $fixup != "" ) @@ -844,6 +857,17 @@ function getFileModificationHistory(): array { } $node->parentNode->removeChild( $node ); } + + if ( $explain ) + { + echo << Date: Tue, 3 Dec 2024 16:13:13 -0300 Subject: [PATCH 2/2] Document and complement XInclude failures as warnings on translations --- configure.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/configure.php b/configure.php index 076690de5..6338f1b4d 100755 --- a/configure.php +++ b/configure.php @@ -816,8 +816,8 @@ function getFileModificationHistory(): array { if ( $ac['LANG'] != 'en' ) { - // XInclude failures are soft erros on translations, so replace - // residual XInclude tags on translations to keep then building. + // XInclude failures are soft errors on translations, so remove + // residual XInclude tags on translations to keep them building. $explain = false; @@ -844,7 +844,7 @@ function getFileModificationHistory(): array { // $fixup = ">"; // break; default: - echo "Unknown parent element at XInclude failure: $tagName\n"; + echo "Unknown parent element of failed XInclude: $tagName\n"; $explain = true; continue 2; } @@ -863,8 +863,9 @@ function getFileModificationHistory(): array { echo <<