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
- Find the manifest item EPUBCheck points to.
- Remove the #fragment from its href, leaving only the file path.
- 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-090It is encouraged to use MIME media type "…" instead of "…".OPF-092Language tag "…" is not well-formed: …OPF-089The "alternate" link rel keyword cannot be paired with other keywords.OPF-093The "media-type" attribute is required for linked resources located in the EPUB containerOPF-088Unrecognized epub:type value "…".OPF-094The "media-type" attribute is required for "…" links.
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.