Menu

#116 missing DTD doesn't cause error exit status

all
open
nobody
None
5
2016-07-13
2016-07-13
No

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

Discussion


Log in to post a comment.