Skip to content
EPUBCheck · Package document (OPF)

EPUBCheck OPF-016: rootfile without full-path

Updated:

EPUBCheck OPF-016 is an error message: “The element "rootfile" is missing its required attribute "full-path".” A rootfile element in META-INF/container.xml has no full-path attribute. That attribute is the only thing that tells reading apps where the package document is, so the book cannot be opened without it.

The official message

The element "rootfile" is missing its required attribute "full-path".

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 hand-written container.xml missing the attribute.
  • The attribute name misspelled, such as fullpath or full_path.
  • A template container.xml that was never completed.

How to fix it

  1. Open META-INF/container.xml.
  2. Add full-path with the package document's path from the root of the archive, for example <rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/>.
  3. Check that the path matches the real file name and case, then rebuild the EPUB.

When it's not this

If full-path is present but empty, EPUBCheck reports OPF-017; if it points to a missing file, OPF-002.

Terms used here

Other OPF messages

  • OPF-015 The property "…" should not be declared in the OPF file.
  • OPF-017 The attribute "full-path" on element "rootfile" must not be empty.
  • OPF-014 The property "…" should be declared in the OPF file.
  • OPF-018 The "remote-resources" property was declared in the Package Document, but no reference to remote resources has been found.
  • OPF-018b The "remote-resources" property was declared in the Package Document, but no reference to remote resources has been found; please check scripted content to make sure the property is legit.
  • OPF-013 Resource "…" is declared with MIME type "…" in content, but has MIME type "…" in the package document.

Sources

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

FAQ

What does EPUBCheck OPF-016 mean?

EPUBCheck OPF-016 is an error message: “The element "rootfile" is missing its required attribute "full-path".” A rootfile element in META-INF/container.xml has no full-path attribute. That attribute is the only thing that tells reading apps where the package document is, so the book cannot be opened without it.

Is OPF-016 an error?

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