ebooknexus.

RSC-005: what it actually means

RSC-005 is Epubcheck's code for every content rule violation, so the code alone tells you almost nothing. The message after it does. Find yours below.

Epub content files are validated against schemas that define which elements may appear where, with which attributes. Any mismatch gets reported as ERROR(RSC-005): Error while parsing file: ... followed by the schema validator's message. A single book can rack up thousands of these from one repeated mistake, which looks terrifying and usually is not: the occurrences almost always collapse into a handful of patterns.

"attribute ... not allowed here"

The attribute is not legal on that element in this Epub version. Three usual suspects:

Fix: delete the attribute. These are metadata for machines, not content; removing them does not change how the book reads. If the same attribute appears hundreds of times, search and replace in an Epub editor clears them in one pass.

"element ... not allowed here" / "not allowed anywhere"

An element sits somewhere the spec forbids. Classic cases: a <div> inside a <p>, block content inside an inline element, or Epub 3 elements like <nav> and <section> in an Epub 2 book. Renderers recover from bad nesting in different ways, so the layout can break in one reader and look fine in another.

Fix: restructure at the reported line. Usually that means closing the parent element first, or swapping the element for one that is allowed there (<span> instead of <div> inside a paragraph, say).

"element ... missing required attribute ..."

The element lacks an attribute the schema requires. In the wild this is most often the page map machinery in toc.ncx: pageList and pageTarget elements written without their required attributes by a converter. If you do not need print page numbers, deleting the whole pageList block is simpler than completing it.

"value of attribute id is invalid; must be an XML name without colons"

id values must be valid XML Names: no leading digit, no spaces, no colons. Conversion tools love generating ids that break these rules, and strict readers reject the file over it. This one the checker repairs automatically: the fixer renames every invalid id and updates every internal link that points at one, so nothing breaks.

"identical playOrder values ..." / "playOrder sequence has gaps"

Epub 2 navigation points in toc.ncx carry a playOrder number, and the numbers must form a clean sequence: no duplicates pointing at different targets, no gaps. Tools that edit the table of contents often leave the numbering behind. Fix: renumber the navPoint elements 1, 2, 3... in document order.

"text not allowed here"

Loose character data sits directly inside an element that only allows child elements, like bare text in an Epub 2 <blockquote> or <body>. Often a sentence that escaped its <p>. Fix: wrap the text in a paragraph, or move it into the neighbouring one.

Working through a big report

Run the book through the checker. It groups every RSC-005 occurrence by the actual problem, explains each group in plain language, and shows the source line and surrounding markup for every hit, so a five hundred error report turns into three or four concrete jobs. The mechanical ones (like invalid ids) it fixes in one click.

Check and fix your Epub

All Epub error codes, explained