Skip to content
EPUBCheck · Package document (OPF)

EPUBCheck OPF-021: unregistered URI scheme

Updated:

EPUBCheck OPF-021 is a warning message: “Use of non-registered URI scheme type in href: "…".” An href uses a URI scheme that is not registered, unlike http, https or mailto. Reading apps may not know what to do with an unregistered scheme, so the link can fail silently.

The official message

Use of non-registered URI scheme type in href: "%1$s".

Default severity
Warning. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.
EPUBCheck version
5.4.0

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

Typical causes

  • A typo in the scheme, such as htp:// or http//.
  • An app-specific scheme that only works in one program, such as a link meant for a particular reader.
  • A local file path (C:\…) written where a URL was expected.

How to fix it

  1. Find the href EPUBCheck names.
  2. Correct the scheme to a standard one (https, http, mailto…) if it is a typo.
  3. If the link only works in one app or on one computer, remove it or replace it with a web address.

When it's not this

If the link points to a file inside the EPUB that does not exist, that is RSC-007.

Terms used here

Other OPF messages

  • OPF-018 The "remote-resources" property was declared in the Package Document, but no reference to remote resources has been found.
  • OPF-018b The "remote-resources" property was declared in the Package Document, but no reference to remote resources has been found; please check scripted content to make sure the property is legit.
  • OPF-017 The attribute "full-path" on element "rootfile" must not be empty.
  • OPF-025 Property value list "…" is not allowed, only one value must be specified.
  • OPF-016 The element "rootfile" is missing its required attribute "full-path".
  • OPF-026 Found malformed property value: "…".

Sources

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

FAQ

What does EPUBCheck OPF-021 mean?

EPUBCheck OPF-021 is a warning message: “Use of non-registered URI scheme type in href: "…".” An href uses a URI scheme that is not registered, unlike http, https or mailto. Reading apps may not know what to do with an unregistered scheme, so the link can fail silently.

Is OPF-021 an error?

OPF-021 is reported as warning by default. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.

PDF to EPUB tools

Every tool uses the same engine and starts with a free 5-page sample.