Skip to content
EPUBCheck · Package document (OPF)

EPUBCheck OPF-070: invalid collection role URL

Updated:

EPUBCheck OPF-070 is a warning message: “Custom collection role "…" is an invalid URL.” A collection element's role is written as a URL, but the URL is not valid. Custom collection roles must be absolute URLs; built-in roles such as index are plain names.

The official message

Custom collection role "%1$s" is an invalid URL.

Default severity
Warning. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.
EPUBCheck version
5.4.0

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • A typo in the URL, such as a missing colon or a space.
  • A relative path or a plain word mixed with URL syntax.
  • A role copied from an old registry with a broken address.

How to fix it

  1. Read the role EPUBCheck quotes.
  2. If it is meant to be a custom role, correct it to a full, valid URL.
  3. If you meant a built-in role, write the plain name instead; remove the collection if nothing uses it.

When it's not this

If the URL is valid, the role is accepted; the content rules of specific collections (index, preview, dictionary) have their own codes.

Terms used here

Other OPF messages

  • OPF-072 Metadata element "…" is empty.
  • OPF-067 The resource "…" must not be listed both as a "link" element in the package metadata and as a manifest item.
  • OPF-073 External identifiers must not appear in the document type declaration.
  • 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-074 Package resource "…" is declared in several manifest items.
  • OPF-065 Invalid metadata declaration, probably due to a cycle in "refines" metadata.

Sources

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

FAQ

What does EPUBCheck OPF-070 mean?

EPUBCheck OPF-070 is a warning message: “Custom collection role "…" is an invalid URL.” A collection element's role is written as a URL, but the URL is not valid. Custom collection roles must be absolute URLs; built-in roles such as index are plain names.

Is OPF-070 an error?

OPF-070 is reported as warning by default. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.