EPUBCheck OPF-030: unique-identifier not found
Updated:
EPUBCheck OPF-030 is an error message: “The unique-identifier "…" was not found.” The package element's unique-identifier attribute names an id that no dc:identifier element has. EPUB requires the book's main identifier to be marked this way, so the book has no valid identity until it is fixed.
The official message
The unique-identifier "%1$s" was not found.
- 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
- The id on dc:identifier was renamed or removed while editing the metadata by hand.
- The dc:identifier itself was deleted, leaving the attribute pointing at nothing.
- A typo or a difference in case between the two values.
How to fix it
- Read the value of unique-identifier on the package element.
- Give one dc:identifier the same id, for example
<package unique-identifier="uid">with<dc:identifier id="uid">urn:uuid:…</dc:identifier>. - If the book has no identifier at all, add one (a UUID or an ISBN).
When it's not this
If the attribute is missing from the package element, that is OPF-048.
Terms used here
Other OPF messages
OPF-029The file "…" does not appear to match the media type …, as specified in the OPF file.OPF-031File listed in reference element in guide was not declared in OPF manifest: ….OPF-028Undeclared prefix: "…".OPF-032Guide references "…" which is not a valid "OPS Content Document".OPF-027Undefined property: "…".OPF-033The spine contains no linear resources.
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.