Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
XML validation with xmllint --stream
I want to validate XML against a dtd.
So, xmllint comes to mind.
In a testsetup, I provoked errors by validating the "test.xml" against a wrong "xyz.dtd".
The outcome is as expected, the returncode is 3 (Validation Error)
# xmllint --valid --dtdvalid xyz.dtd --noout test.xml 2> /dev/null # echo $? 3
So it would be wise to use the --stream option.
But this comes back without errors:
# xmllint --valid --dtdvalid xyz.dtd --stream --noout test.xml 2> /dev/null # echo $? 0
So my question:
Is there some structural reason, why --stream and --valid cannot work together?
Or is that a bug in xmllint?
Used libxml versions, same result:
ubuntu 9.0.4: libxml2-utils-2.6.32.dfsg-5ubuntu4.2
CentOS 5.3: libxml2-2.6.26-126.96.36.199
I think I remember it works with xsd instead of dtd.