HTM-004
Updated:
EPUBCheck HTM-004 is an error message: “Irregular DOCTYPE: found "…", expected "…".” A document has a DOCTYPE other than the one expected for its EPUB version; EPUBCheck shows both.
The official message
Irregular DOCTYPE: found "%1$s", expected "%2$s".
- Default severity
- Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
- EPUBCheck version
- 5.4.0
%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.
Typical causes
How to fix it
- For EPUB 3 XHTML, use
<!DOCTYPE html>.
Terms used here
Other HTM messages
HTM-003External entities are not allowed in EPUB v3 documents. External entity declaration found: ….HTM-009The DOCTYPE provided is obsolete or irregular and can be removed.HTM-010Namespace "…" is unusual for the prefix "epub".HTM-011Entity is undeclared.HTM-025Non-registered URI scheme type found in href.HTM-045Encountered empty href.
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EPUBLab.