Quote:
Originally Posted by Bob Houston
My question is - Could the presence of 'Doctype' be noted, and inserted if not present, as the very first thing when the xhtml or html files are parsed?
|
I'm afraid it's not that easy. For example, if the file contains any SVG code (as in an SVG-wrapped cover image), then, as far as I know, there is no appropriate DOCTYPE and none should be used.
But I'm not so sure a DOCTYPE is needed in order to use entities. It might be needed if you want to ensure XHTML compliance on its own, but inside an ePub the requirements for XHTML documents seem to be a bit different, and I'm not claiming I fully understand it. What does epubcheck say?