Kindle Forum banner

So... iBooks is picky. 2 ePub errors left.

1.4K views 17 replies 9 participants last post by  Peter Spenser  
#1 ·
Hey gang. My Kindle file uploaded to KDP fine. My ePub uploaded to Kobo fine and I tested it on an old Kobo device. Also tested it on iBooks by sending it to myself on my iPad. Looks great. But the epub file has to be completely free of all errors to be accepted to iBooks.

The two errors I am getting are:

element "i" not allowed here; expected the element end-tag or element "address", "blockquote", "del", "div", "dl", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ins", "noscript", "ns:svg", "ol", "p", "pre", "script", "table" or "ul" (with xmlns:ns="http://www.w3.org/2000/svg")

and

element "strong" not allowed here; expected the element end-tag or element "address", "blockquote", "del", "div", "dl", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ins", "noscript", "ns:svg", "ol", "p", "pre", "script", "table" or "ul" (with xmlns:ns="http://www.w3.org/2000/svg")

If anyone has any suggestions for what could be causing these and/or how to fix 'em, please let me know. I'll send over a $10 Amazon gift card to the person who helps me solve this!
 
#3 ·
expected the element end-tag
Look first for an unclosed element. That's what the quote above means. That is a VERY common typo. When I get these they drive me crazy trying to find them.

Note the chapter file in which it/they appear, and then open that HTML file with your browser. The file should stop loading exactly at the error point and you can then look inside the HTML file and see what's up. Since you said that the book looks good in an e-book reader, you probably did not go far enough into the book to see the error display on the screen.

I won't be monitoring this thread much (busy time here) so message me if you need more help. Long-distance fixing is always tough. Good luck!
 
#4 ·
I used TextMate for coding and Calibre for making the file. Is there another program I should have used instead?

I went through the whole file on iBooks and it worked perfectly. But I'll go through the code and see if I missed any closing tags just in case.

Would those errors possibly be coming up if the closing tag was on the next line, like:

Blah blah blah


Or would that matter?

Thanks for the help, I appreciate it!
 
#5 ·
JillianneHamilton said:
Calibre for making the file
That is the problem.

Calibre is perfect for making EPUB files to upload to KDP, but Calibre does not create valid EPUB files that are needed some other places, iBooks being one. And, after finding and correcting those two errors, you book may cascade down to some other error... or not (if you're lucky).

Since you're a Mac person, you're lucky. Apple's Pages app creates perfectly valid EPUB files, and it's only $20.00 or so. But you'd have to semi-re-do your book.

If you are truly conversant in HTML, you can write the whole thing yourself (re-reading now, I see that you have already done this) and assemble it into the EPUB file with ePub Zip and ePub UnZip apps. They're free and they work great.
 
#8 ·
Did you convert from DOCX or HTML in Calibre?

A lot of old instructions say to convert from html but it had a load of issues. They added a docx converter a year and change ago and it is massively superior at producing error free epubs.

Another option is to ping pong within Calibre. Convert epub to mobi, then convert the resulting mobi back to epub.
 
#9 ·
Hi Kat,
I coded it myself in TextMate and then loaded the HTML file into Calibre. I have a bit of prior experience with coding. Naturally, this makes me more annoyed than I would be otherwise. haha
I will give ping-ponging a shot too before I try it in Pages.
 
#10 ·
I use http://www.bookow.com/ to format all of my print and eBooks. It creates professional eBooks in seconds and is very reasonably priced and super easy to use. ;)

I have never been rejected by any online retailer since I started using this site, but the one time I was, it was my fault because I had a link that did not have the "http://" before the "www." in a URL.

Hope this helps!
 
#11 ·
I coded it myself in TextMate and then loaded the HTML file into Calibre. I have a bit of prior experience with coding. Naturally, this makes me more annoyed than I would be otherwise. haha
I will give ping-ponging a shot too before I try it in Pages.
The HTML converter is terrible, but I honestly have never seen a docx converted with calibre fail epubcheck.
 
#13 ·
I had similar problems to the OP, and I also used Calibre. Here's what happened in my case:

If you have italics or other formatting that extends beyond one paragraph, Calibre breaks it up weirdly. So, for example, you might have something like:
Text of the first paragraph. Some sentences. Blah blah blah.

Text of the second paragraph. Some more sentences. Blah blah blah.
Or Calibre might even have done something a bit weirder and placed the closing italics tag outside of the paragaph tag, like so:

Text of the first paragraph. Some sentences. Blah blah blah.

Text of the second paragraph. Some more sentences. Blah blah blah.

What the Epub check wants is for your formatting tags to exist entirely inside a single paragraph, so to get it to pass Epub check, you need to format it like this:

Text of the first paragraph. Some sentences. Blah blah blah.

Text of the second paragraph. Some more sentences. Blah blah blah.
 
#14 ·
JillianneHamilton said:
Hi Kat,
I coded it myself in TextMate and then loaded the HTML file into Calibre. I have a bit of prior experience with coding. Naturally, this makes me more annoyed than I would be otherwise. haha
I will give ping-ponging a shot too before I try it in Pages.
If you have prior experience with coding, download the free program Sigil. Should be a breeze.

Run the epub through http://validator.idpf.org/. It'll tell you exactly where you have to correct the errors.

Good luck.
 
#17 ·
This issue is solved! Broke my epub apart with ePub Zip/Unzip and went through the code. Calibre added a TON of junk code and I just had to go in, delete it (it's fairly easy to find), rezip the folder and it validated perfectly. Hurray! Thank you everyone for their advice!