XMLStarlet 1.6.1 on both Windows and Linux
When validating an XML file (val option), a missing DTD causes an error to be reported when the "-e" option is used. However, it does not cause an error (i.e. non-zero exit status) to be returned with the "-b" option. So:
$ xmlstarlet val -b -e fileWithMissingDTD.xml
...failed to load external entity...
$ echo $?
0
Without the "-e" option, nothing is reported:
$ xmlstarlet val -b fileWithMissingDTD.xml
$ echo $?
0