Skip to content
EPUBCheck · Resources and references

EPUBCheck RSC-003: no OPF rootfile in container

Updated:

EPUBCheck RSC-003 is an error message: “No rootfile tag with media type "application/oebps-package+xml" was found in the container.” META-INF/container.xml exists but none of its rootfile elements has the media type application/oebps-package+xml, so the package document cannot be found. Reading apps rely on that exact value to pick the package document.

The official message

No rootfile tag with media type "application/oebps-package+xml" was found in the container.

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 misspelled or missing media-type attribute on the rootfile element.
  • A container.xml written by hand or copied from a template with another media type, such as application/xml or text/xml.

How to fix it

  1. Open META-INF/container.xml.
  2. Set media-type="application/oebps-package+xml" on the rootfile element that points to the package document.
  3. Check that its full-path is correct too, rebuild and validate again.

When it's not this

If the rootfile is right but the file it names does not exist, the error is PKG-020.

Terms used here

Other RSC messages

  • RSC-002 Required META-INF/container.xml resource could not be found.
  • RSC-004 File "…" is encrypted, its content will not be checked.
  • RSC-001 File "…" could not be found.
  • RSC-005 Error while parsing file: …
  • RSC-006 Remote resource reference is not allowed in this context; resource "…" must be located in the EPUB container.
  • RSC-006b Resource "…" is located outside the EPUB Container; please check the resource is retrieved in scripted content.

Sources

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

FAQ

What does EPUBCheck RSC-003 mean?

EPUBCheck RSC-003 is an error message: “No rootfile tag with media type "application/oebps-package+xml" was found in the container.” META-INF/container.xml exists but none of its rootfile elements has the media type application/oebps-package+xml, so the package document cannot be found. Reading apps rely on that exact value to pick the package document.

Is RSC-003 an error?

RSC-003 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.

PDF to EPUB tools

Every tool uses the same engine and starts with a free 5-page sample.