@@ -814,10 +814,16 @@ function getFileModificationHistory(): array {
814
814
}
815
815
}
816
816
817
- { # Automatic xi:include / xi:fallback fixups
817
+ if ( $ ac ['LANG ' ] != 'en ' )
818
+ {
819
+ // XInclude failures are soft errors on translations, so remove
820
+ // residual XInclude tags on translations to keep them building.
821
+
822
+ $ explain = false ;
818
823
819
824
$ 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 " );
821
827
foreach ( $ nodes as $ node )
822
828
{
823
829
$ fixup = null ;
@@ -831,8 +837,15 @@ function getFileModificationHistory(): array {
831
837
case "refsect1 " :
832
838
$ fixup = "<title></title> " ;
833
839
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;
834
846
default :
835
- echo "Unknown parent element, validation may fail: $ tagName \n" ;
847
+ echo "Unknown parent element of failed XInclude: $ tagName \n" ;
848
+ $ explain = true ;
836
849
continue 2 ;
837
850
}
838
851
if ( $ fixup != "" )
@@ -844,6 +857,18 @@ function getFileModificationHistory(): array {
844
857
}
845
858
$ node ->parentNode ->removeChild ( $ node );
846
859
}
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
+ that configure.php cannot patch the translated manual into a validating
867
+ state. Please report any "Unknown parent" messages on the doc-base
868
+ repository, and focus on fixing XInclude/XPointers failures above. \n\n
869
+ MSG ;
870
+ exit (-1 ); // stop here, do not let more messages further confuse the matter
871
+ }
847
872
}
848
873
849
874
echo "Validating {$ ac ["INPUT_FILENAME " ]}... " ;
0 commit comments