EPUBCheck OPF-035: XHTML declared as text/html
Updated:
EPUBCheck OPF-035 is a warning message: “Media type "text/html" is not appropriate for XHTML/OPS.” A content document is declared as text/html in an EPUB 2 package; EPUB content documents are XHTML and need application/xhtml+xml. Reading apps may treat a text/html document as an unsupported type.
The official message
Media type "text/html" is not appropriate for XHTML/OPS.
EPUBCheck's suggestion: Use "application/xhtml+xml" instead.
- Default severity
- Warning. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.
- EPUBCheck version
- 5.4.0
Typical causes
- Manifests generated by tools that treat chapters as web pages.
- A manifest typed by hand using the familiar web media type.
- Files renamed from .html without changing their declaration.
How to fix it
When it's not this
If the declared type is another deprecated EPUB 2 type, EPUBCheck reports OPF-037.
Terms used here
Other OPF messages
OPF-034The spine contains multiple references to the manifest item with id "…".OPF-036Video type "…" might not be supported by reading systemsOPF-033The spine contains no linear resources.OPF-037Found deprecated media-type "…".OPF-032Guide references "…" which is not a valid "OPS Content Document".OPF-031File listed in reference element in guide was not declared in OPF manifest: ….
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.