epubcheck icon indicating copy to clipboard operation
epubcheck copied to clipboard

DOCTYPE Error

Open rdeltour opened this issue 13 years ago • 6 comments

From [email protected] on September 19, 2013 15:26:33

PROBLEM: I created a media rich ePub with inDesign following a Lynda.com tutorial and I get:

ERROR: 3-DJiu-Jitsu3.epub/OEBPS/toc.ncx: External DTD entities are not allowed. Remove the DOCTYPE.
ERROR: 3-DJiu-Jitsu3.epub/OEBPS/toc.ncx: External DTD entities are not allowed. Remove the DOCTYPE.

When I remove the DOCTYPE line, I get a ton of errors in the file.

METHOD:

  • Created ePub in Design, relatively simple layout with the exception of multiple mp4 files and a fair amount of hyperlinks.
  • Exported to ePub 3
  • Used pagina EPUB-Checker to validate
  • Received above error
  • Attempted to remove DOCTYPE line in Sigil. When I do, the file generates a slew of new errors.

Here is the DOCTYPE line from my toc.ncx:

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

EXPECTED: I simply want to get the ePub validated so that I can move on to distribution.

PLATFORM: Software and such: Windows InDesign (latest) pagina EPUB-Checker Sigil

ADDITIONAL INFO: My ePub is too large too attach here, but I can provide a dropbox or a Google Drive invitation if having the file itself would help.

Original issue: http://code.google.com/p/epubcheck/issues/detail?id=306

rdeltour avatar Oct 15 '13 01:10 rdeltour

From [email protected] on September 24, 2013 10:35:05

Please upload your toc.ncx file for further examination.

rdeltour avatar Oct 15 '13 01:10 rdeltour

Same validation error I met.

''' OPS/toc.ncx: External DTD entities are not allowed. Remove the DOCTYPE. '''

Is there any solution for it?

toc.ncx I will update shortly.

zeewelc avatar Jul 21 '14 16:07 zeewelc

Aren't external DTDs forbidden in EPUB 3 according to http://www.idpf.org/epub/301/spec/epub-publications.html#sec-xml-constraints? If so, the NCX must indeed not have its DOCTYPE declared in EPUB 3 files.

elmimmo avatar Apr 07 '15 15:04 elmimmo

Hmm... external DTDs are forbidden in Publication Resources. Publication resources are defined as "A resource that contains content or instructions that contribute to the logic and rendering of at least one Rendition of an EPUB Publication."[1] However, according to the spec, "EPUB 3 Reading Systems must ignore the NCX."[2]

Seems like the NCX does not conform to the definition of a Publication Resource, so the external DTD is acceptable.

[1] http://www.idpf.org/epub/301/spec/epub-publications.html#gloss-publication-resource-cmt-or-foreign [2] http://www.idpf.org/epub/301/spec/epub-publications.html#ncx-superseded

jstallent avatar Apr 07 '15 15:04 jstallent

Seems like the NCX does not conform to the definition of a Publication Resource

Interesting point, although I'm not sure it is intended that NCX can be considered not a Publication Resource. @mattgarrish WDYT ?

btw, all samples of valid EPUB 3 with NCX we have in tests have no doctype declaration.

rdeltour avatar Apr 07 '15 16:04 rdeltour

It’s not required for rendering in a reading system that can properly handle EPUB 3 publications, yes, but it is there to enable the rendering of that rendition in an EPUB 2 reading system, so it’s still technically a publication resource. The statement about ignoring was added to reinforce that it’s not a pick and choose option for reading systems when it comes to which document to use.

Another way of looking at non-publication resources is that they can be omitted from the manifest (opf links, external hyperlinks), which isn’t true for the ncx.

So, as a publication resource, it has to follow the guidelines and not reference an external DTD.

My memories of the discussions around omitting external identifiers are vague, at best, these days, but as the only effect omitting has on the NCX is that it allows the playOrder attribute to be omitted, it wasn’t seen as a problematic change so no special exemption was given.

Omitting from the samples was by design.

mattgarrish avatar Apr 07 '15 16:04 mattgarrish