Skip to content
EPUBCheck · XHTML content documents

EPUBCheck HTM_054: reserved custom namespace

Updated:

EPUBCheck HTM_054 is an error message: “Custom attribute namespace ("…") must not include the string "…" in its domain.” A custom attribute uses a namespace whose domain contains w3.org or idpf.org. EPUB allows prefixed custom attributes only in namespaces outside those two domains, which are reserved for the standards themselves.

The official message

Custom attribute namespace ("%1$s") must not include the string "%2$s" in its domain.

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

EPUBCheck prints this ID with an underscore instead of a hyphen; this page uses the ID exactly as EPUBCheck reports it.

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • An attribute in a made-up namespace under w3.org or idpf.org, often a typo for a real namespace.
  • A real EPUB or HTML attribute written with the wrong namespace URI, so it is treated as a custom one.

How to fix it

  1. Open the file EPUBCheck names (the message gives the path, line and column) in a text or EPUB editor such as Sigil, or unzip the EPUB and open it there.
  2. If the attribute is a standard one (such as epub:type), declare its correct namespace, for example xmlns:epub="http://www.idpf.org/2007/ops".
  3. If it is your own or a vendor's attribute, move it to a namespace URI on a domain you control, or remove it.
  4. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

When it's not this

If the problem is a data-* attribute name, that is HTM_061.

Terms used here

Other HTM messages

  • HTM_055 The "…" element should not be used (discouraged construct)
  • HTM_056 Viewport metadata has no "…" dimension (both "width" and "height" properties are required)
  • HTM-051 Found Microdata semantic enrichments but no RDFa. EDUPUB recommends using RDFa Lite.
  • HTM_057 Viewport "…" value must be a positive number or the keyword "device-…"
  • HTM_058 HTML documents must be encoded in UTF-8, but UTF-16 was detected.
  • HTM_059 Viewport "…" property must not be defined more than once, but found values […].

Sources

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

FAQ

What does EPUBCheck HTM_054 mean?

EPUBCheck HTM_054 is an error message: “Custom attribute namespace ("…") must not include the string "…" in its domain.” A custom attribute uses a namespace whose domain contains w3.org or idpf.org. EPUB allows prefixed custom attributes only in namespaces outside those two domains, which are reserved for the standards themselves.

Is HTM_054 an error?

HTM_054 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.