Skip to content
EPUBCheck · NCX (EPUB 2 table of contents)

NCX-004

Updated:

EPUBCheck NCX-004 is a usage message: “NCX identifier ("dtb:uid" metadata) should not contain leading or trailing whitespace.” The NCX's dtb:uid value has spaces or line breaks before or after it.

The official message

NCX identifier ("dtb:uid" metadata) should not contain leading or trailing whitespace.

Default severity
Usage. Informative only and hidden by default: it appears when EPUBCheck runs with -u (--usage). It does not make the EPUB invalid.
EPUBCheck version
5.4.0

Typical causes

  • Pretty-printed XML that put the value on its own line.

How to fix it

  • Remove the whitespace around the value of dtb:uid.

Terms used here

Other NCX messages

  • NCX-006 Empty "text" label in the NCX document
  • NCX-001 NCX identifier ("…") does not match OPF identifier ("…").

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

FAQ

What does EPUBCheck NCX-004 mean?

EPUBCheck NCX-004 is a usage message: “NCX identifier ("dtb:uid" metadata) should not contain leading or trailing whitespace.” The NCX's dtb:uid value has spaces or line breaks before or after it.

Is NCX-004 an error?

NCX-004 is reported as usage by default. Informative only and hidden by default: it appears when EPUBCheck runs with -u (--usage). It does not make the EPUB invalid.