View Single Post
Old 10-16-2020, 11:20 AM   #222
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,858
Karma: 6120478
Join Date: Nov 2009
Device: many
I took a peek at your problem epub. The issue is not with the plugin. The issue is that your xhtml file is missing the proper DOCTYPE header which provides the DTD info that defines named entities.

Without that DOCTYPE there are no named entities of any kind defined anyplace (except for the basic xml named entities for <, >, &, etc.

This made the named entity & n b s p ; (skip the added spaces) undefined and therefore an error under epub2. With the proper DOCTYPE then adding a nbsp is just fine.

(Aside: Under epub3, there is a different DOCTYPE required and no named entities are defined at all meaning only numeric entities are allowed.)


So by simply editing your file (or Mending it with Sigil) and adding the following DOCTYPE info immediately after the xml declaration header, everything should be just fine:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
The complete top of the file should look like the following:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
Hope this helps.
KevinH is offline   Reply With Quote