OPF-006
Updated:
EPUBCheck OPF-006 is an error message: “Invalid prefix declaration: URI "…" is not a valid URI.” The URI given for a prefix is not a valid URI.
The official message
Invalid prefix declaration: URI "%1$s" is not a valid URI.
- 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
%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.
Typical causes
- A typo in the URI, or text that is not a URI where the URI should be.
- Hand-edited or tool-generated package documents that write the prefix attribute with the wrong separators.
How to fix it
- The prefix attribute on the package element maps short prefixes to vocabulary URIs, as space-separated pairs like
prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/". Correct the URI to the vocabulary's published address. - Reserved prefixes such as dcterms, rendition and schema need no declaration at all.
Terms used here
Other OPF messages
OPF-005Invalid prefix declaration: URI for prefix "…" doesn’t exist.OPF-007Re-declaration of reserved prefix "…".OPF-004Invalid prefix declaration: leading or trailing whitespace is not allowed.OPF-004aInvalid prefix declaration: found empty prefix.OPF-004bInvalid prefix "…": must be a valid non-colonized name (aka "NCName").OPF-004cInvalid prefix declaration: prefix "…" must be immediately followed by a colon character (":").
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EPUBLab.