xmllint -dtdvalid fails to report invalid XML
Eric Hanchrow
erich@votehere.net
Tue Jul 1 17:54:00 GMT 2003
This is libxml2 2.5.7.
Here's the input DTD, and the input XML:
10:21:47 [erich@alpha examples]$ cat /tmp/tiny.dtd
<!ELEMENT Foo (Bar+)>
<!ELEMENT Bar (#PCDATA)>
10:25:42 [erich@alpha examples]$ cat /tmp/tiny.xml
<!DOCTYPE Foo PUBLIC "" "/tmp/tiny.dtd">
<Foo>
</Foo>
Here's xmllint working properly (with the `-valid' switch):
10:20:52 [erich@alpha examples]$ xmllint -noout -valid /tmp/tiny.xml
/tmp/tiny.xml:2: validity error: Element Foo content does not follow
the DTD
Expecting (Bar)+, got ()
</Foo>
^
Here's xmllint failing, by not reporting an error:
10:20:45 [erich@alpha examples]$ xmllint -noout -dtdvalid
/tmp/tiny.dtd /tmp/tiny.xml
10:20:46 [erich@alpha tmp]$ echo $?
0
I could not repro this problem on Linux, using the same version of libxml2.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list