Skip to content
EPUBCheck · Package document (OPF)

EPUBCheck OPF-091: fragment in manifest href

Updated:

EPUBCheck OPF-091 is an error message: “The item href URL must not have a fragment identifier.” A manifest item's href contains a fragment identifier (the part of a URL after the hash sign). Manifest items declare whole files, so their URLs must not point inside a file.

The official message

The item href URL must not have a fragment identifier.

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

Typical causes

  • An href copied from a link, such as chapter1.xhtml#start.
  • A tool that builds manifest entries from table of contents links.
  • A fragment left after editing paths by hand.

How to fix it

  1. Find the manifest item EPUBCheck points to.
  2. Remove the #fragment from its href, leaving only the file path.
  3. If two items now point to the same file, keep one and update references to the other's id.

When it's not this

If a metadata link points to an element of the package document itself, that is OPF-098.

Terms used here

Other OPF messages

  • OPF-090 It is encouraged to use MIME media type "…" instead of "…".
  • OPF-092 Language tag "…" is not well-formed: …
  • OPF-089 The "alternate" link rel keyword cannot be paired with other keywords.
  • OPF-093 The "media-type" attribute is required for linked resources located in the EPUB container
  • OPF-088 Unrecognized epub:type value "…".
  • OPF-094 The "media-type" attribute is required for "…" links.

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck OPF-091 mean?

EPUBCheck OPF-091 is an error message: “The item href URL must not have a fragment identifier.” A manifest item's href contains a fragment identifier (the part of a URL after the hash sign). Manifest items declare whole files, so their URLs must not point inside a file.

Is OPF-091 an error?

OPF-091 is reported as error by default. 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.