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
- Read the role EPUBCheck quotes.
- If it is meant to be a custom role, correct it to a full, valid URL.
- 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-072Metadata element "…" is empty.OPF-067The resource "…" must not be listed both as a "link" element in the package metadata and as a manifest item.OPF-073External identifiers must not appear in the document type declaration.OPF-066Missing "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-074Package resource "…" is declared in several manifest items.OPF-065Invalid 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.