Skip to content
EPUBCheck · Package document (OPF)

OPF-035

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; EPUB content documents are XHTML and need application/xhtml+xml.

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.

How to fix it

  • Change the media-type of those items to application/xhtml+xml, and make sure the files are well-formed XHTML.

Terms used here

Other OPF messages

  • OPF-034 The spine contains multiple references to the manifest item with id "…".
  • OPF-033 The spine contains no linear resources.
  • OPF-031 File listed in reference element in guide was not declared in OPF manifest: ….
  • OPF-030 The unique-identifier "…" was not found.
  • OPF-040 Fallback item with id "…" could not be found.
  • OPF-029 The file "…" does not appear to match the media type …, as specified in the OPF file.

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EPUBLab.

FAQ

What does EPUBCheck OPF-035 mean?

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; EPUB content documents are XHTML and need application/xhtml+xml.

Is OPF-035 an error?

OPF-035 is reported as warning by default. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.