GNOME Bugzilla – Bug 739982
xmlParseDTD fails to parse DTDs (for ex. html strict.dtd)
Last modified: 2017-06-13 23:42:28 UTC
I am trying to use --dtdvalid option (which calls xmlParseDTD), and it fails on the standard html-4.01 DTD: $ xmllint --html --dtdvalid file:///home/yuri/strict.dtd index.html <...skipped html errors...> file:///home/yuri/strict.dtd:81: parser error : xmlParseEntityDecl: entity ContentType not terminated -- media type, as per [RFC2045] ^ file:///home/yuri/strict.dtd:81: parser error : Content error in the external subset -- media type, as per [RFC2045] ^ Could not parse DTD file:///home/yuri/strict.dtd DTD is from http://www.w3.org/TR/html4/strict.dtd All other DTDs I tried also had similar problems. libxml2-2.9.1_1 (not in the list of versions in this bugzilla)
You're trying to load an SGML DTD. Try the XHTML DTDs: https://www.w3.org/TR/xhtml1/dtds.html