# EPUBCheck OPF-004b: Invalid prefix …: must be a valid…

Source: https://epublab.com/epubcheck/opf-004b/ (updated 2026-11-03)

EPUBCheck OPF-004b is an error message: “Invalid prefix "…": must be a valid non-colonized name (aka "NCName").” A prefix name in the prefix attribute is not a valid XML name (NCName).

- Official message (EPUBCheck 5.4.0): Invalid prefix "%1$s": must be a valid non-colonized name (aka "NCName").
- Default severity: Error

## Typical causes

- A prefix that starts with a digit or contains characters such as spaces or slashes.
- 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/". Use a name made of letters, digits, hyphens and underscores, starting with a letter.
- Reserved prefixes such as dcterms, rendition and schema need no declaration at all.

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