External identifiers must not appear in the document type declaration.

7 posts / 0 new
Last post

I have created an EPUB 3.0.1. While validating I receive the message 'External identifiers must not appear in the document type declaration'.

As I am new to digital publishing, I do not understand what is wrong and most importantly what I have to do to solve the problem.

Could you please help?


Make sure that you're only using the HTML5 doctype in your content documents:

<!DOCTYPE html>

If you've used an XHTML 1.1 doctype, it will contain an external reference to the DTD hosted on w3.org:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Since external DTD references are no longer needed in HTML5, they were banned from EPUB 3.

Also, if you have an NCX file, make sure that there's no doctype declared in it. It's not necessary, and can also trigger the error.

The XML variant of HTML5 is used in EPUB3, therefore no need for <!DOCTYPE html> either - this might be of some use only, if one needs to define an internal DTD set like own entities, more useful for the corresponding construction <!DOCTYPE svg> within an SVG content document.
And of course, if one wants to use the HTML5 specific entities, one has to define them fpr the XML variant as well in a DTD set.

For SVG content documents there is some minor conflict anyway, because the SVG variant 1.1, to be used in EPUB 3 has a DTD and the recommendation explains, how to but a doctype into SVG files, EPUB obviously does not want, some SVG editors add this doctype automatically. But the SVG recommendation does not indicate, that one has to do it, it is an optional help for validation.

Hello, the error in my case is at this line. What I should do exactly?

<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN"
"http://www.daisy.org/z3986/2005/ncx-2005-1.dtd"><ncx version="2005-1" xmlns="http://www.daisy.org/z3986/2005/ncx/">

Remove that line.

The doctype isn't necessary in the NCX, and having an external identifier, as it does, it is not valid in epub 3.

More specifically, remove this part:

<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN"

I didn't notice you'd pasted the start <ncx> tag in.

Thank you! Now it's ok! :-)

Secondary menu