View Single Post
Old 11-16-2020, 11:09 AM   #37
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,915
Karma: 6120478
Join Date: Nov 2009
Device: many
Just as your error message image explained. Your files are missing the DOCTYPE line at the top. Sigil up until 1.0 always added the proper doctype (they differ between epub2 and epub3).

epubcheck does not seem to catch this. But simply run Mend or allow Sigil to auto fix them and the proper DOCTYPE will be added and if you the run epubcheck again, you will see it pass if it did before.

Although calibre does not use a doctype, it can then not use named entities like "nbsp" and etc and so must replace them with the proper unicode character.

Sigil under epub2 does allow named entities and so technically requires the proper DOCTYPE be present to define them in xhtml just as the epub2 spec provides since use of named entities in many epubs is common.

So if you either add the proper DOCTYPE or allow Sigil's Mend to do it, all will be fine in Sigil then all issues should go away and epubcheck will still be happy.

This was default behaviour in Sigil up to Sigil 1.0, where it got relaxed but the caused errors when some people then used named (not numeric) entities in epub2. So detecting when it is missing and properly adding it was added back to prevent these issues (including making the default blank xhtml page fail since it used nbsp).

Hope this explains things.

KevinH

ps: Here are the appropriate doctypes for epub2 and epub3:
Code:
 epub3:

<!DOCTYPE html>


epub2:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Quote:
Originally Posted by StephV View Post
Hi,

I updated to 1.4.0 but it appears that this update is not working at all for me. Every book I open (that validated fine previously and contains no epubcheck errors) suddenly aren't "well-formed" (but really, there is no error at all and the headers are the same on every xhtml file within a single file).



Here is a "well-formed" header:

Attachment 183421

And here is a "faulty" header (according to 1.4.0):

Attachment 183422

Unfortunately, as I need a few tools that are blocked by the "well-formed" validation, I'm forced to revert back to 1.3 for now...

Last edited by KevinH; 11-16-2020 at 11:24 AM.
KevinH is offline