Quote:
Originally Posted by StephV
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).
|
I was able to reproduce this issue. The problem is not caused by a missing doctype.
If the Mend On Open option is enabled and the user opens an epub2/epub3 book
without the following XML declaration:
Code:
<?xml version="1.0" encoding="utf-8"?>
Sigil will display a warning and add the XML declaration to all files.
However,
according to the W3C the XML declaration is only necessary if the HTML file isn't encoded as utf-8 or utf-16.
Quote:
Originally Posted by W3C
The XML declaration is only required if the page is not being served as UTF-8 (or UTF-16), but it can be useful to include it so that developers, testers, or translation production managers can visually check the encoding of a document by looking at the source.
Polyglot markup: A page that uses polyglot markup uses a subset of HTML with XML syntax that can be parsed either by an HTML or an XML parser. It is described in Polyglot Markup: A robust profile of the HTML5 vocabulary.
Since a polyglot document must be in UTF-8, you don't need to, and indeed must not, use the XML declaration.
|