How does EPUB container and XML validation catch store rejections?
Retailers reject EPUB files over silent structural defects inside the ZIP wrapper, package manifest, or chapter XHTML before page one opens. This validator unpacks your file inside a browser Web Worker via fflate to check byte-zero ZIP headers, OPF declarations, XML syntax, and fragment links without uploading manuscripts.
Checking the byte-zero mimetype ZIP header and container XML
Under the W3C EPUB 3.3 Core Specification, an Open Container Format archive starts at byte zero with a PK local file header naming mimetype. That entry requires compression method 0 (STORE), 0 bytes of extra header data, and the exact 20 bytes of ASCII matching application/epub+zip.
Re-zipping folders from macOS Finder or Windows Explorer compresses mimetype or places .DS_Store first, triggering OCF-002 and OCF-003 errors. Next, META-INF/container.xml is parsed to verify that the declared .opf package document exists.
Parsing OPF manifests, reading spines, and orphan files
Every OPF <item> must declare unique id, href, and media-type attributes pointing to real archive files. EPUB 3 requires a nav document (MAN-004), while EPUB 2 warns when no NCX table of contents exists (MAN-005).
- Spine integrity: Every
<itemref idref="...">inside<spine>must match a declared manifest ID (MAN-006). - Orphan asset sweep: Archive files outside
mimetype,META-INF/,iTunesMetadata.plist, and.DS_Storemissing manifest references triggerMAN-007.
Clean drafts prevent container and manifest rejections before publishing starts. Build valid archives from plain text with the Markdown to EPUB converter before running pre-flight checks.
EPUB validation error codes and severity levels
Switching across the All, Errors, Warnings, EAA 2025, and Info tabs filters diagnostics into nine standardized rule groups. The summary cards at the top immediately display Archive status, Errors / Warnings, EAA 2025 metadata, and Spine & Orphans counts for rapid triage.
| Rule prefix | Severity | Scope checked | Typical cause |
|---|---|---|---|
OCF-001 to OCF-010 |
Error / Warning | ZIP signature, byte-zero mimetype, container.xml |
Re-zipped archive with Deflate on mimetype or missing rootfile |
DRM-001 / DRM-002 |
Error / Info | META-INF/encryption.xml and rights.xml |
Content DRM (DRM-001) vs harmless IDPF/Adobe font obfuscation (DRM-002) |
OPF-001 / OPF-002 |
Error | Package document path and XML well-formedness | Missing .opf file or syntax errors inside <package> |
MAN-001 to MAN-007 |
Error / Warning | <manifest>, <spine>, nav/NCX, unreferenced files |
Missing image asset, missing EPUB 3 nav, or orphan .jpg files |
META-001 to META-006 |
Error / Warning | Dublin Core elements and UTC dcterms:modified |
Absent dc:title, dc:identifier, or non-UTC modification timestamp |
EAA-001 |
Warning | Five schema:* OPF accessibility metadata terms |
Missing EU Accessibility Act properties required after June 2025 |
XHTML-001 / LINK-002 |
Error / Warning | XML syntax, duplicate IDs, <img> alt, #fragment anchors |
Unescaped &, , missing alt (A11Y-001), or broken links |
When your publishing pipeline spans reflowable ebooks and fixed-layout editions, Amazon KDP and Apple Books both validate container headers under ISO 23736 and W3C EPUB Accessibility 1.1 Specification conformance tags before catalog ingestion. Check EPUB containers here first, then check tagged PDF documents for PDF/UA compliance before uploading store packages.
Meeting European Accessibility Act metadata rules in OPF
Commercial ebooks distributed in Europe fall under the EU European Accessibility Act Directive 2019/882, which took effect on June 28, 2025. Missing accessibility tags in the OPF <metadata> block trigger EAA-001 warnings and block storefront compliance badges across European distributors.
Five required schema.org properties under EAA 2025
The checker audits five machine-readable schema: declarations inside your OPF <metadata> block that retailers rely on when displaying assistive reading badges. Checking Apply EAA 2025 schema accessibility defaults automatically populates standard baseline textual publication properties whenever existing metadata tags are absent.
- Access modes:
schema:accessMode(textual) andschema:accessModeSufficient(textual) tell assistive platforms which senses are needed to read the publication. - Structural features:
schema:accessibilityFeaturedeclaresstructuralNavigation,tableOfContents, andreadingOrder. - Hazards and summary:
schema:accessibilityHazard(none) and EAA accessibility summary (schema:accessibilitySummary) confirm safe rendering and describe reading aids in plain language.
Image alt attributes and visual contrast checks
During the XHTML, SVG, and NCX scan, every <img> missing an alt attribute raises A11Y-001 so screen reader users are not left with bare filenames. Decorative dividers should carry an explicit empty alt="" rather than omitting the attribute.
For illustrated technical books, technical diagrams also need distinguishable color encoding beyond red-green pairs. Test exported figure graphics before packaging so you keep ebook charts distinguishable under color blindness across devices.
Fixing Dublin Core metadata and repacking clean archives
Instead of unzipping folders manually and risking broken ZIP offsets, use Metadata & EAA quick-fix on the right panel to patch package metadata directly in memory. Saving validates the updated archive immediately and downloads a clean -fixed.epub file.
Editing dc:title, identifiers, and cover artwork locally
The quick-fix form updates Book title (dc:title), Author (dc:creator), Language (dc:language), Identifier (ISBN / UUID), Publisher, and EAA accessibility summary while writing a fresh UTC YYYY-MM-DDTHH:MM:SSZ timestamp matching the DCMI Metadata Terms Specification. Clicking Replace cover image embeds a new JPEG, PNG, WebP, or GIF under images/cover-updated.* and updates properties="cover-image".
Selecting Save and repack EPUB runs packEpubArchive, writing mimetype uncompressed at deflate level 0 first and compressing all remaining resources at deflate level 6. You can also click Convert to PDF in the top card to hand the validated file off locally without downloading first.
Why XML entity errors and broken anchors happen in exports
Word processors and HTML exporters frequently emit bare & symbols, , or © inside XHTML chapters, triggering XHTML-001 because XML parsers recognize only &, <, >, ", ', and numeric entities. Duplicate id or xml:id values raise XHTML-002, while relative href or #fragment targets pointing to missing files or anchors raise LINK-001 and LINK-002.
Tip: Replace custom link colors in your EPUB stylesheet with high-contrast pairs verified in our EPUB stylesheet color contrast evaluator before packing, since e-readers override low-luminance hues unevenly across light, sepia, and night themes.