File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -877,17 +877,23 @@ function getFileModificationHistory(): array {
877877 exit (0 ); // Tell the shell that this script finished successfully.
878878} else {
879879 echo "failed. \n" ;
880- echo "\nThe document didn't validate, " ;
880+ echo "\nThe document didn't validate \n " ;
881881
882882 /**
883883 * TODO: Integrate jing to explain schema violations as libxml is *useless*
884884 * And this is not going to change for a while as the maintainer of libxml2 even acknowledges:
885885 * > As it stands, libxml2's Relax NG validator doesn't seem suitable for production.
886886 * cf. https://gitlab.gnome.org/GNOME/libxml2/-/issues/448
887887 */
888- echo 'Please use Jing and the: ' . PHP_EOL
889- . 'java -jar ./build/jing.jar /path/to/doc-base/docbook/docbook-v5.2-os/rng/docbookxi.rng /path/to/doc-base/.manual.xml ' . PHP_EOL
890- . 'command to check why the RelaxNG schema failed. ' . PHP_EOL ;
888+ $ output = shell_exec ('java -jar ./docbook/jing.jar ./docbook/docbook-v5.2-os/rng/docbookxi.rng .manual.xml ' );
889+ if ($ output === null ) {
890+ echo "Command failed do you have Java installed? " ;
891+ } else {
892+ echo $ output ;
893+ }
894+ //echo 'Please use Jing and the:' . PHP_EOL
895+ // . 'java -jar ./build/jing.jar /path/to/doc-base/docbook/docbook-v5.2-os/rng/docbookxi.rng /path/to/doc-base/.manual.xml' . PHP_EOL
896+ // . 'command to check why the RelaxNG schema failed.' . PHP_EOL;
891897
892898 // Exit normally when don't care about validation
893899 if ($ ac ["FORCE_DOM_SAVE " ] == "yes " ) {
You can’t perform that action at this time.
0 commit comments