EPUBCheck OPF-050: spine toc is not an NCX
Updated:
EPUBCheck OPF-050 is an error message: “TOC attribute references resource with non-NCX mime type; "application/x-dtbncx+xml" is expected.” The spine's toc attribute points to an item that is not an NCX file. In EPUB 2 (and in EPUB 3 books that keep an NCX for old readers) toc must name the NCX item.
The official message
TOC attribute references resource with non-NCX mime type; "application/x-dtbncx+xml" is expected.
- 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
Typical causes
- toc set to the id of the navigation document instead of the NCX.
- toc pointing at a chapter or another file by mistake.
- The NCX declared with the wrong media type, so it does not look like an NCX.
How to fix it
When it's not this
If toc names an id that does not exist at all, that is OPF-049.
Terms used here
Other OPF messages
OPF-049Item id "…" was not found in the manifest.OPF-048Package tag is missing its required unique-identifier attribute and value.OPF-053Date value "…" does not follow recommended syntax as per http://www.w3.org/TR/NOTE-datetime:….OPF-054Date value "…" is not valid as per http://www.w3.org/TR/NOTE-datetime:….OPF-045Encountered circular reference in fallback chain.OPF-055… tag is empty.
Sources
- EPUB 3.3, §5.7.1 The spine element · read
- EPUB 3.3, §5.9.5 NCX · read
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.