# EPUBCheck OPF-005: prefix without a URI, how to fix it

Source: https://epubcc.com/epubcheck/opf-005/ (updated 2026-11-04)

EPUBCheck OPF-005 is an error message: “Invalid prefix declaration: URI for prefix "…" doesn’t exist.” A prefix in the prefix attribute has no URI after it. Each prefix exists only to stand for a vocabulary URI, so a mapping without one cannot be used by any property in the package document.

- Official message (EPUBCheck 5.4.0): Invalid prefix declaration: URI for prefix "%1$s" doesn’t exist.
- Default severity: Error

## Typical causes

- A mapping cut short, such as "ibooks:" at the end of the attribute.
- A URI deleted while editing, leaving only the prefix and its colon.
- A line break or quote in the wrong place that splits the URI away from its prefix.

## How to fix it

1. Find the prefix EPUBCheck names in the prefix attribute of the package element.
2. Write each mapping as the prefix name, a colon, one space and the vocabulary URI, and separate mappings with whitespace, for example prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/ foaf: http://xmlns.com/foaf/spec/".
3. If the prefix is not used by any property in the package document, delete the whole mapping instead.

## When it's not this

If a URI is there but malformed, EPUBCheck reports OPF-006; if the layout of spaces and colons is the problem, it reports a variant of OPF-004.

## Sources

- EPUB 3.3, §D.1.4 The prefix attribute: https://www.w3.org/TR/epub-33/#sec-prefix-attr (read 2026-11-04)

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