Skip to content
Novus Examples
fb21.5 KB

FB2 - Converter Twin of the EPUB Pair

The FictionBook build of the same two chapters: one self-contained XML file with a description block, no container and no manifest. The third member of the conversion set, and the one that has to invent an equivalent for everything the EPUB package documents declare.

Preview — first 23 linesfb2
<?xml version="1.0" encoding="UTF-8"?>
<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink">
  <description>
    <title-info>
      <genre>sci_philosophy</genre>
      <author><first-name>Ilse</first-name><last-name>Brandt-Nakamura</last-name></author>
      <book-title>The Same Book Three Ways</book-title>
      <lang>en</lang>
    </title-info>
    <document-info>
      <author><nickname>novus</nickname></author>
      <date value="2026-08-07">2026</date>
      <id>novus-p7-convert-twin</id>
      <version>1.0</version>
    </document-info>
  </description>
  <body>
    <title><p>The Same Book Three Ways</p></title>
    <section><title><p>One. A Single Source</p></title><p>These three files carry identical words. One is an EPUB 2.0.1 navigated by an NCX and a guide, one is an EPUB 3 navigated by a navigation document, and one is a FictionBook - a single XML file with the whole book inside it.</p><p>A converter that is working produces the other two from any one of them without losing a chapter, a heading, or an accented character.</p></section>
    <section><title><p>Two. Where Conversions Leak</p></title><p>Conversions leak at the edges: the guide references EPUB 3 has no place for, the FB2 description block that has no EPUB equivalent, the cover that is a manifest property in one format, a meta element in another, and a base64 blob in the third.</p><p>Everything in this trio was chosen to sit on one of those edges.</p></section>
  </body>
</FictionBook>

Specifications

Seed
20260807
Format
FictionBook 2.0
Encoding
UTF-8
Sections
2
Structure
single self-contained XML
Line Endings
LF

Testing contract

Expected to pass
Scenario
Convert the FB2 to EPUB 3 and compare with the shipped EPUB 3 twin.
Expected result
Both sections become chapters in the same order with identical text, and the FB2 description block maps onto dc:title, dc:creator and dc:language rather than being dropped.

What is a .fb2 file?

FB2 (FictionBook) is an XML-based e-book format that stores an entire book, including metadata and embedded images, in a single well-structured XML file. It emphasizes semantic markup of book structure over fixed presentation. It is especially popular in the Russian-speaking e-book community.

How to use this file

Use an example FB2 to test XML e-book parsing, embedded-image extraction, metadata handling, and converters between FB2 and EPUB.

How to use this file for testing

“FB2 - Converter Twin of the EPUB Pair” is a deterministic Novus Examples fixture for Conversion testing. The same content exported across many formats and linked as a group, so you can convert one and diff against the expected twin.

Documented properties for this file: seed 20260807 · UTF-8 · LF. 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.

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