@@ -814,10 +814,16 @@ function getFileModificationHistory(): array {
814814 }
815815}
816816
817- { # Automatic xi:include / xi:fallback fixups
817+ if ( $ ac ['LANG ' ] != 'en ' )
818+ {
819+ // XInclude failures are soft erros on translations, so replace
820+ // residual XInclude tags on translations to keep then building.
821+
822+ $ explain = false ;
818823
819824 $ xpath = new DOMXPath ( $ dom );
820- $ nodes = $ xpath ->query ( "//*[local-name()='include'] " );
825+ $ xpath ->registerNamespace ( "xi " , "http://www.w3.org/2001/XInclude " );
826+ $ nodes = $ xpath ->query ( "//xi:include " );
821827 foreach ( $ nodes as $ node )
822828 {
823829 $ fixup = null ;
@@ -831,8 +837,15 @@ function getFileModificationHistory(): array {
831837 case "refsect1 " :
832838 $ fixup = "<title></title> " ;
833839 break ;
840+ case "tbody " :
841+ $ fixup = "<row><entry></entry></row> " ;
842+ break ;
843+ // case "variablelist":
844+ // $fixup = "<varlistentry><term>></term><listitem><simpara></simpara></listitem></varlistentry>";
845+ // break;
834846 default :
835- echo "Unknown parent element, validation may fail: $ tagName \n" ;
847+ echo "Unknown parent element at XInclude failure: $ tagName \n" ;
848+ $ explain = true ;
836849 continue 2 ;
837850 }
838851 if ( $ fixup != "" )
@@ -844,6 +857,17 @@ function getFileModificationHistory(): array {
844857 }
845858 $ node ->parentNode ->removeChild ( $ node );
846859 }
860+
861+ if ( $ explain )
862+ {
863+ echo <<<MSG
864+ \nIf you are seeing this message on a translation, this means that
865+ XInclude/XPointers failures reported above are so many or unknown,
866+ so that configure.php cannot patch the translated manual in a consistent
867+ state. Please report this issue on the doc-base repository. \n\n
868+ MSG ;
869+ exit (-1 ); // stop here, do not let more messages further confuse the matter
870+ }
847871}
848872
849873echo "Validating {$ ac ["INPUT_FILENAME " ]}... " ;
0 commit comments