Skip to content
EPUBCheck · Package document (OPF)

EPUBCheck OPF-048: missing unique-identifier

Updated:

EPUBCheck OPF-048 is an error message: “Package tag is missing its required unique-identifier attribute and value.” The package element has no unique-identifier attribute, which is required. It points to the dc:identifier that identifies the book, and reading apps use it to tell books and editions apart.

The official message

Package tag is missing its required unique-identifier attribute and value.

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

Typical causes

  • A package document written by hand or by a tool that omitted it.
  • The attribute misspelled, such as uniqueidentifier or unique-id.
  • A package element replaced when merging books.

How to fix it

  1. Make sure the metadata has a dc:identifier with an id, for example <dc:identifier id="uid">urn:uuid:…</dc:identifier>.
  2. Add unique-identifier with that id to the package element, for example <package version="3.0" unique-identifier="uid">.
  3. Run EPUBCheck again to confirm the two match.

When it's not this

If the attribute exists but points to an id no dc:identifier has, that is OPF-030.

Terms used here

Other OPF messages

  • OPF-049 Item id "…" was not found in the manifest.
  • OPF-050 TOC attribute references resource with non-NCX mime type; "application/x-dtbncx+xml" is expected.
  • OPF-045 Encountered circular reference in fallback chain.
  • OPF-044 Spine item with non-standard media-type "…" has no EPUB content document fallback.
  • OPF-043 Spine item with non-standard media-type "…" has no fallback.
  • OPF-053 Date value "…" does not follow recommended syntax as per http://www.w3.org/TR/NOTE-datetime:….

Sources

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

FAQ

What does EPUBCheck OPF-048 mean?

EPUBCheck OPF-048 is an error message: “Package tag is missing its required unique-identifier attribute and value.” The package element has no unique-identifier attribute, which is required. It points to the dc:identifier that identifies the book, and reading apps use it to tell books and editions apart.

Is OPF-048 an error?

OPF-048 is reported as error by default. 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.