These come from the XHTML content documents — invalid markup, broken internal links, and files that are referenced but missing or undeclared. RSC-005 alone accounts for a huge share of all epubcheck output.
RSC-005
Error while parsing file: <specific validation message>
What it means: The catch-all. epubcheck validates every XHTML, OPF, and nav file against the EPUB schemas, and any violation is reported as RSC-005 — so the code itself tells you almost nothing. The real diagnosis is in the message after the colon: duplicate id attributes, an element not allowed in that context, a missing required attribute, unclosed tags, and so on.
How to fix it: Ignore the code and read the trailing message plus the file, line, and column epubcheck gives you. Common examples: “Duplicate ID” means two elements share the same id — rename one. “Element X not allowed here” usually means invalid nesting, like a <div> inside a <p>. Fix each reported line; one structural mistake can cascade into several RSC-005 lines, so re-run after each fix.
HTM-004
Irregular DOCTYPE: found '…', expected '…'.
What it means: The DOCTYPE at the top of an XHTML file doesn’t match what the EPUB version expects. EPUB 3 content documents should start with the plain HTML5 doctype, while EPUB 2 used the XHTML 1.1 doctype. This typically appears after converting an old EPUB 2 book to EPUB 3, or when a tool pasted in a nonstandard DOCTYPE.
How to fix it: For EPUB 3, replace the first line of the file with <!DOCTYPE html> (after the XML declaration, if present). Do it in every content file — conversion tools tend to leave the same stale DOCTYPE everywhere.
RSC-007
Referenced resource could not be found in the EPUB.
What it means: Something in your book — an <img> src, a stylesheet link, an href — points to a file that simply isn’t in the container. Nine times out of ten it’s a path problem: wrong folder (../images/ vs images/), a renamed file, or a case mismatch (cover.JPG on disk, cover.jpg in the link — EPUB paths are case-sensitive).
How to fix it: Take the exact path from the error, and check it against the archive character by character, including capitalization and folder depth relative to the referencing file. Either fix the reference or add the missing file back into the EPUB (and declare it in the manifest).
RSC-008
Referenced resource '…' is not declared in the OPF manifest.
What it means: The mirror image of OPF-003, but an error rather than a warning: the file is present in the container and your content actually links to it, yet the OPF manifest never declares it. Since the manifest is the authoritative list of the book’s resources, an undeclared-but-used file is a spec violation.
How to fix it: Add a manifest <item> for the file with a unique id, the correct href, and the correct media-type — e.g. <item id="map1" href="images/map.png" media-type="image/png"/>.
RSC-011
Found a reference to a resource that is not a spine item.
What it means: A hyperlink points to an XHTML document that exists and is declared in the manifest, but isn’t listed in the spine — the ordered list of documents that make up the reading flow. Readers can only navigate to spine content, so the link would lead nowhere.
How to fix it: Either add the target document to the spine (an <itemref> in the OPF, with linear="no" if it shouldn’t appear in the normal page flow) or repoint the link at a document that is in the spine.
RSC-012
Fragment identifier is not defined.
What it means: A link targets an anchor that doesn’t exist: href="notes.xhtml#note-42" but nothing in notes.xhtml has id="note-42". Very common in books with footnotes, endnotes, or indexes, and after re-generating chapters (which often rewrites ids) without re-generating the links that point at them.
How to fix it: Open the target file and either add the missing id to the right element or update the link to the id that actually exists. If a conversion tool built your notes, re-export the whole book in one pass so links and anchors are generated together.