Skip to content
EPUBCheck · Package document (OPF)

EPUBCheck OPF-065: refines metadata loop

Updated:

EPUBCheck OPF-065 is an error message: “Invalid metadata declaration, probably due to a cycle in "refines" metadata.” Metadata refines chains loop back on themselves, so EPUBCheck cannot resolve what refines what. Each meta element with refines describes another element, and following those links must end somewhere.

The official message

Invalid metadata declaration, probably due to a cycle in "refines" metadata.

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

  • A meta element whose refines attribute points, directly or through others, back to itself.
  • ids reused or swapped while editing metadata by hand.
  • Metadata merged from two sources that used the same ids.

How to fix it

  1. Find the meta elements with refines attributes in the metadata section.
  2. For each one, check that refines points (with #id) to the element it describes, such as a dc:creator.
  3. Break the loop by correcting the refines value or the id it points to.

When it's not this

If refines points to an id that does not exist, EPUBCheck reports a reference error instead.

Terms used here

Other OPF messages

  • OPF-066 Missing "dc:source" or "source-of" pagination metadata. The pagination source must be identified using the "dc:source" and "source-of" properties when the content includes page break markers.
  • OPF-063 Referenced Adobe page-map item "…" was not found in the manifest.
  • OPF-067 The resource "…" must not be listed both as a "link" element in the package metadata and as a manifest item.
  • OPF-062 Found Adobe page-map attribute on spine element in opf file.
  • OPF-060 Duplicate entry in the ZIP file: "…" (file names must be unique after Unicode canonical normalization and full case folding).
  • OPF-070 Custom collection role "…" is an invalid URL.

Sources

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

FAQ

What does EPUBCheck OPF-065 mean?

EPUBCheck OPF-065 is an error message: “Invalid metadata declaration, probably due to a cycle in "refines" metadata.” Metadata refines chains loop back on themselves, so EPUBCheck cannot resolve what refines what. Each meta element with refines describes another element, and following those links must end somewhere.

Is OPF-065 an error?

OPF-065 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.