EPUBCheck RSC-005: schema error in a file
Updated:
EPUBCheck RSC-005 is an error message: “Error while parsing file: ….” A file does not follow the schema EPUB requires for it. An element, attribute or value is not allowed where it is, or something required is missing; the text after "Error while parsing file:" says which. It is the most common EPUBCheck error, and one structural mistake can cause several messages.
The official message
Error while parsing file: %1$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
- "element X not allowed here" or "attribute X not allowed here": elements nested where the schema forbids them (a div inside a p), or attributes that HTML or EPUB do not define, often copied from web pages or word processors.
- "Duplicate ID": the same id value used twice in one document, often from copied footnotes or headings.
- Missing required metadata, such as the dcterms:modified date of an EPUB 3 package document, or a missing required element such as title in the XHTML head.
- "value of attribute X is invalid": a value of the wrong type, such as a date in the wrong format or an id that starts with a digit.
How to fix it
- Read the text after the colon: EPUBCheck reports the file, the line and column, and the parser's own description of the problem.
- Fix the element or attribute it names: move or remove the element, delete the unknown attribute, or make the duplicate id unique and update the links that pointed to it.
- In package documents, add the missing metadata, for example
<meta property="dcterms:modified">2026-11-03T00:00:00Z</meta>(exactly one, in that format). - Fix the first errors first and validate again: one structural error can cause several later ones.
When it's not this
If the file is not even well-formed XML (an unescaped & or an unclosed tag), EPUBCheck reports the fatal RSC-016 instead.
Terms used here
Other RSC messages
RSC-004File "…" is encrypted, its content will not be checked.RSC-006Remote resource reference is not allowed in this context; resource "…" must be located in the EPUB container.RSC-006bResource "…" is located outside the EPUB Container; please check the resource is retrieved in scripted content.RSC-003No rootfile tag with media type "application/oebps-package+xml" was found in the container.RSC-007Referenced resource "…" could not be found in the EPUB.RSC-002Required META-INF/container.xml resource could not be found.
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.