EPUB 3 - Intentionally Invalid (XHTML declared as text/html)
An intentionally invalid EPUB whose second chapter is declared as text/html instead of application/xhtml+xml, making it a foreign resource in the reading order with no fallback. Intentionally invalid and clearly labelled; the bytes of that file are ordinary, valid XHTML.
- mimetype
- container.xml
- content.opf
- nav.xhtml
- style.css
- chapter1.xhtml
- chapter2.xhtml
- chapter3.xhtml
Specifications
- Seed
- 20260807
- Epub Version
- 3.0
- Wrong Item
- chapter2.xhtml
- Declared Type
- text/html
- Actual Type
- application/xhtml+xml
- Defect
- a spine document is declared with a media type that is not a core content type
Testing contract
Expected to fail- Scenario
- Validate the package, then page from chapter one into chapter two.
- Expected result
- A validator reports the non-core media type in the spine; a reader either renders the document anyway by sniffing the bytes or reports the type mismatch, rather than showing a blank page.
What is a .epub file?
EPUB is the open e-book standard, a ZIP archive containing XHTML content documents, CSS, images, and a package manifest describing reading order and metadata. It supports reflowable text that adapts to screen size and is supported by most e-readers except Kindle natively. It is the dominant format for distributable e-books.
How to use this file
Use an example EPUB to test e-book parsing, ZIP-package and manifest handling, reading-order and metadata extraction, and rendering in e-reader applications.
How to use this file for testing
“EPUB 3 - Intentionally Invalid (XHTML declared as text/html)” is a deterministic Novus Examples fixture for Error handling, Conversion testing. Deliberately corrupt and invalid files, clearly labelled, for testing how your tool fails.
Documented properties for this file: seed 20260807. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
E-book fixtures are structured archives documented down to their spine and manifest. Test readers and converters, and where a valid↔intentionally-invalid pair exists, assert graceful handling of the malformed container.
Code examples
ebook-convert wrong-media-type.epub out.pdf # Calibre
unzip -l wrong-media-type.epub # EPUB is a ZIPRelated files
- epubEPUB — Intentionally Invalid (bad OCF mimetype)An intentionally invalid EPUB: identical to the valid twin except its OCF mimetype entry is compressed and mislabelled as application/zip — a real EPUB spec violation. For testing how readers and validators handle a malformed container. Clearly labelled; harmless content.

- epubEPUB 3 - Embedded Font, Intentionally Invalid (obfuscation not declared)An intentionally invalid EPUB whose embedded font is IDPF-obfuscated while META-INF/encryption.xml is missing, so nothing in the container says the bytes were scrambled. Intentionally invalid and clearly labelled - this is the real-world failure where a book silently renders in a substitute face.

- epubEPUB 3 - Fixed Layout, Intentionally Invalid (no viewport meta)An intentionally invalid fixed-layout EPUB: rendition:layout says pre-paginated but no content document declares a viewport meta, so the canvas size is undefined. Intentionally invalid and clearly labelled - for testing validators and the fallback a reader picks when it has no dimensions to scale to.

- epubEPUB 3 - Intentionally Invalid (NCX only, no navigation document)An intentionally invalid EPUB 3 that ships only an NCX: no manifest item carries properties="nav", which EPUB 3 requires. Intentionally invalid and clearly labelled - it separates readers that fall back to the NCX from readers that refuse to open a book with no navigation document.

- epubEPUB 3 - MathML, Intentionally Invalid (mathml property missing)An intentionally invalid EPUB: the content document contains MathML while its manifest item omits properties="mathml", so the package understates what a reader needs. Intentionally invalid and clearly labelled - identical to its declared twin in every other byte of markup.

- epubEPUB 3 - Media Overlay with No media:durationA working media overlay whose package omits the required media:duration metadata entirely. Everything else is intact, so this fixture isolates one question: does the reader refuse the overlay, or fall back to measuring the audio itself?

Generated by generation/ebooks_p7.py. Free for any use, no attribution required — license.