Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Apple Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 12-27-2016, 01:03 PM   #1
jrett
Member
jrett began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2016
Device: none
Ibooks-   invalid?

Hi,

I'm trying to read in Ibooks the epubs I create, but it says that   is invalid. I read another post on here that said that this is related to an extra space in the DTD, however, I went in and took out the space and it still says that   is invalid. Does anyone know why this is happening and how to fix it?

Oh, and not sure if it's relevant, but I'm trying to edit them in Dreamweaver. I know Calibre is capable of creating the space without the   but I can't use Calibre for these specific books.
jrett is offline   Reply With Quote
Old 12-27-2016, 01:36 PM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,725
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by jrett View Post
I'm trying to read in Ibooks the epubs I create, but it says that   is invalid.
iBooks is an epub3 app and you can't use named entities such as   in epub3 books. You should use numerical entities instead. For example:

Code:
 
Quote:
Originally Posted by jrett View Post
I know Calibre is capable of creating the space without the   but I can't use Calibre for these specific books.
Why don't you give Sigil a try. It has much better epub3 support than Calibre Editor. (Otherwise they pretty much have the same functionality.)
Doitsu is offline   Reply With Quote
Advert
Old 12-27-2016, 06:51 PM   #3
cedhax
Addict
cedhax ought to be getting tired of karma fortunes by now.cedhax ought to be getting tired of karma fortunes by now.cedhax ought to be getting tired of karma fortunes by now.cedhax ought to be getting tired of karma fortunes by now.cedhax ought to be getting tired of karma fortunes by now.cedhax ought to be getting tired of karma fortunes by now.cedhax ought to be getting tired of karma fortunes by now.cedhax ought to be getting tired of karma fortunes by now.cedhax ought to be getting tired of karma fortunes by now.cedhax ought to be getting tired of karma fortunes by now.cedhax ought to be getting tired of karma fortunes by now.
 
Posts: 286
Karma: 1546488
Join Date: Jan 2016
Device: ipad
Quote:
Originally Posted by Doitsu View Post
iBooks is an epub3 app and you can't use named entities such as   in epub3 books. ...
I thought I read it somewhere else too, but can't it on the official EPUB site. So I am not 100% sure about it. Can you give me a pointer? Thanks.
cedhax is offline   Reply With Quote
Old 12-27-2016, 07:08 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,681
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
You do not need to make ePub 3 eBooks for iBooks. You can make ePub 2 eBooks.
JSWolf is offline   Reply With Quote
Old 12-28-2016, 02:09 AM   #5
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,725
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by cedhax View Post
I thought I read it somewhere else too, but can't it on the official EPUB site. So I am not 100% sure about it. Can you give me a pointer? Thanks.
Epub3 books are based on the HTML5 XHTML syntax and HTML5 XHTML files mustn't contain named entities. (XHTML is based on XML and XML only supports 5 predefined entities.)

Quote:
Originally Posted by W3C
Note: According to the XML specification, XML processors are not guaranteed to process the external DTD subset referenced in the DOCTYPE. This means, for example, that using entity references for characters in XHTML documents is unsafe if they are defined in an external file (except for <, >, &, " and ').
Quote:
Originally Posted by JSWolf View Post
You do not need to make ePub 3 eBooks for iBooks. You can make ePub 2 eBooks.
You need to create epub3 books, if you want to sell on iBooks.
Doitsu is offline   Reply With Quote
Advert
Old 12-29-2016, 12:24 PM   #6
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Where does the idea that HTML5 does not support named characters? It certainly does and if iBooks doesn't then it is not HTML5 compliant. The list of Named character references is in our wiki. This list is a superset of entities and certainly includes nbsp.

Dale
DaleDe is offline   Reply With Quote
Old 12-29-2016, 05:39 PM   #7
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,725
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DaleDe View Post
Where does the idea that HTML5 does not support named characters? It certainly does and if iBooks doesn't then it is not HTML5 compliant. The list of Named character references is in our wiki. This list is a superset of entities and certainly includes nbsp.
HTML5 does support named entities, however, the epub3 standard does not support them without additional entity declarations in the doctype, because epub3 content docs (=HTML files) need to be formatted as HTML5 XHTML files. For more information, see the official epub3 specs.

BTW, you can easily test this for yourself. Create a new epub3 book, insert named entities such as   and have it checked by epubcheck.

For example, the following code will fail epubcheck:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title></title>
</head>
<body>
<p>&nbsp;</p>
</body>
</html>
it'll only pass epubcheck if an entity definition is added:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html [
    <!ENTITY nbsp "&#160;"> 
]>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title></title>
</head>
<body>
<p>&nbsp;</p>
</body>
</html>
Doitsu is offline   Reply With Quote
Old 02-19-2017, 12:02 AM   #8
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by Doitsu View Post
it'll only pass epubcheck if an entity definition is added:
Can this be put in the css file, or otherwise just once in the book rather than in the head of every xhtml file?

I've just been looking at a HarperCollins ePub and had ePubCheck warn me of this, so I'm pretty sure it's not a fatal error, but I'd like to stop it complaining. I could of course just convert to numeric entities, but I'm a human being and I prefer readable code rather than having to decompile as I read.

Quote:
Originally Posted by JSWolf View Post
You do not need to make ePub 3 eBooks for iBooks. You can make ePub 2 eBooks.
You can, but the TOC may not work properly. I used to hand code an epub3-style nav.xhtml file and put it in a ePub2 until I found the ePub3-itizer for Sigil.

Last edited by AlanHK; 02-19-2017 at 03:07 AM.
AlanHK is offline   Reply With Quote
Old 02-19-2017, 09:40 AM   #9
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,725
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by AlanHK View Post
Can this be put in the css file, or otherwise just once in the book rather than in the head of every xhtml file?
No.You'll have to define it in each XHTML file or simply replace all &nbsp; with &#160;.
Doitsu is offline   Reply With Quote
Reply

Tags
&nbsp;, ibooks for mac, invalid tag


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
&()nbsp , &()#160 , inconsistencies?? rbruce1314 Sigil 47 09-18-2015 12:29 PM
&#160; instead of &nbsp; Alt68er Sigil 16 01-02-2014 08:02 PM
iBooks does NOT LIKE &nbsp; Erin Apple Devices 0 09-13-2011 11:17 AM


All times are GMT -4. The time now is 04:33 AM.


MobileRead.com is a privately owned, operated and funded community.