Book Validation

All books must adhere to EPUB standards. To ensure quality content, your book must pass validation at the time of import. There are a few issues commonly encountered with books that prevent them from importing into the Apple Books system. Review all books carefully to ensure that the following are addressed prior to delivery:

If you use custom attributes, they must be HTML5 data attributes. A data attribute is an attribute that exists outside of a namespace and starts with the string data-.

For more information on HTML5 data attributes, see:

http://www.w3.org/TR/html5/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes

Example:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"> <head>...</head> <body ... <p class="text" data-name="value">text</p> ... </body></html>

Namespaces define the XML vocabularies that contain the elements and attributes you're using in the EPUB’s content documents. Each namespace is declared using a URL and the attribute xmlns or xmlns:. For example, xmlns:xhtml="http://www.w3.org/1999/xhtml".

In the above declaration, xmlns: is the attribute and xhtml is its prefix. After you declare it, you can use the prefix in front of any element or attribute name separated by a colon. This identifies which XML vocabulary that element or attribute is referencing.

If a delivery ends in an error related to an element or attribute that’s not allowed, the specific element or attribute you're using might not be in the namespace vocabularies declared in the EPUB. To resolve the issue, change the element or attribute to one that is valid.