Skip to content
EPUBCheck · Package document (OPF)

OPF-007

Updated:

EPUBCheck OPF-007 is a warning message: “Re-declaration of reserved prefix "…".” The package document re-declares one of EPUB's reserved prefixes.

The official message

Re-declaration of reserved prefix "%1$s".

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

  • Copying a prefix attribute that includes mappings for reserved prefixes such as dcterms or rendition.
  • 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/". Remove the mapping for the reserved prefix from the attribute.
  • Reserved prefixes such as dcterms, rendition and schema need no declaration at all.

Terms used here

Other OPF messages

  • OPF-006 Invalid prefix declaration: URI "…" is not a valid URI.
  • OPF-005 Invalid prefix declaration: URI for prefix "…" doesn’t exist.
  • OPF-004 Invalid prefix declaration: leading or trailing whitespace is not allowed.
  • OPF-004a Invalid prefix declaration: found empty prefix.
  • OPF-004b Invalid prefix "…": must be a valid non-colonized name (aka "NCName").
  • OPF-004c Invalid 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.

FAQ

What does EPUBCheck OPF-007 mean?

EPUBCheck OPF-007 is a warning message: “Re-declaration of reserved prefix "…".” The package document re-declares one of EPUB's reserved prefixes.

Is OPF-007 an error?

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