Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCTYPE Error #305

Closed
rdeltour opened this issue Oct 15, 2013 · 6 comments
Closed

DOCTYPE Error #305

rdeltour opened this issue Oct 15, 2013 · 6 comments
Assignees
Milestone

Comments

@rdeltour
Copy link
Member

@rdeltour rdeltour commented Oct 15, 2013

From mcar...@gmail.com 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
Copy link
Member Author

@rdeltour rdeltour commented Oct 15, 2013

From tobias.c...@gmail.com on September 24, 2013 10:35:05

Please upload your toc.ncx file for further examination.

@zeewelc
Copy link

@zeewelc zeewelc commented Jul 21, 2014

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.

@rdeltour rdeltour added this to the 4.0-beta1 milestone Aug 15, 2014
@elmimmo
Copy link

@elmimmo elmimmo commented Apr 7, 2015

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.

@rdeltour rdeltour self-assigned this Apr 7, 2015
@jstallent
Copy link

@jstallent jstallent commented Apr 7, 2015

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

@rdeltour
Copy link
Member Author

@rdeltour rdeltour commented Apr 7, 2015

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.

@mattgarrish
Copy link
Member

@mattgarrish mattgarrish commented Apr 7, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants