@@ -210,6 +210,11 @@ function print_xml_errors($details = true) {
210210 $ output = ( $ ac ['STDERR_TO_STDOUT ' ] == 'yes ' ) ? STDOUT : STDERR ;
211211 if ($ errors && count ($ errors ) > 0 ) {
212212 foreach ($ errors as $ err ) {
213+ if ($ ac ['LANG ' ] != 'en ' && // translations
214+ $ ac ['XPOINTER_REPORTING ' ] != 'yes ' && // can disable
215+ strncmp ($ err ->message , 'XPointer evaluation failed: ' , 27 ) == 0 ) {
216+ continue ;
217+ }
213218 $ errmsg = wordwrap (" " . trim ($ err ->message ), 80 , "\n " );
214219 if ($ details && $ err ->file ) {
215220 $ file = file (urldecode ($ err ->file )); // libxml appears to urlencode() its errors strings
@@ -720,19 +725,22 @@ function generate_sources_file() // {{{
720725echo "done. \n" ;
721726
722727echo "Running XInclude/XPointer... " ;
723- flush ();
724-
725728$ dom ->xinclude ();
726-
727729echo "done. \n" ;
728730flush ();
729731
730- if ( $ ac ['XPOINTER_REPORTING ' ] == 'yes ' || ( $ ac ['LANG ' ] == 'en ' ) )
732+ if ( $ ac ['XPOINTER_REPORTING ' ] == 'yes ' || $ ac ['LANG ' ] == 'en ' )
731733{
732734 $ errors = libxml_get_errors ();
733735 $ output = ( $ ac ['STDERR_TO_STDOUT ' ] == 'yes ' ) ? STDOUT : STDERR ;
734- foreach ( $ errors as $ error )
735- fprintf ( $ output , "{$ error ->message }\n" );
736+ if ( count ( $ errors ) > 0 )
737+ {
738+ fprintf ( $ output , "\n" );
739+ foreach ( $ errors as $ error )
740+ fprintf ( $ output , "{$ error ->message }\n" );
741+ if ( $ ac ['LANG ' ] == 'en ' )
742+ errors_are_bad (1 );
743+ }
736744}
737745
738746echo "Validating {$ ac ["INPUT_FILENAME " ]}... " ;
0 commit comments