File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1001,13 +1001,21 @@ function xinclude_residual( DOMDocument $dom )
1001
1001
// XInclude failures are soft errors on translations, so remove
1002
1002
// residual XInclude tags on translations to keep them building.
1003
1003
1004
+ $ header = false ;
1004
1005
$ explain = false ;
1005
1006
1006
1007
$ xpath = new DOMXPath ( $ dom );
1007
1008
$ xpath ->registerNamespace ( "xi " , "http://www.w3.org/2001/XInclude " );
1008
1009
$ nodes = $ xpath ->query ( "//xi:include " );
1009
1010
foreach ( $ nodes as $ node )
1010
1011
{
1012
+ if ( $ header == false )
1013
+ {
1014
+ echo "\nFailed XInclude: \n" ;
1015
+ $ header = true ;
1016
+ }
1017
+ echo "- {$ node ->getAttribute ("xpointer " )}\n" ;
1018
+
1011
1019
$ fixup = null ;
1012
1020
$ parent = $ node ->parentNode ;
1013
1021
$ tagName = $ parent ->nodeName ;
@@ -1030,7 +1038,7 @@ function xinclude_residual( DOMDocument $dom )
1030
1038
$ explain = true ;
1031
1039
continue 2 ;
1032
1040
}
1033
- if ( $ fixup != "" )
1041
+ if ( $ fixup !== null )
1034
1042
{
1035
1043
$ other = new DOMDocument ( '1.0 ' , 'utf8 ' );
1036
1044
$ other ->loadXML ( "<f> $ fixup</f> " );
@@ -1043,6 +1051,9 @@ function xinclude_residual( DOMDocument $dom )
1043
1051
$ node ->parentNode ->removeChild ( $ node );
1044
1052
}
1045
1053
1054
+ if ( $ header )
1055
+ echo "\n" ;
1056
+
1046
1057
if ( $ explain )
1047
1058
{
1048
1059
echo <<<MSG
You can’t perform that action at this time.
0 commit comments