![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jan 2011
Device: kindle, sony reader, kobo
|
Epub works fine on Reader, fails epubcheck spectacularly
Hi,
Complete noob here, but hoping someone can point me in the right direction, since my web searches haven't been fruitful. My book is out in print, and I managed to create a kindle version, which has been available in the Kindle store for a good year (it's a choose-your-own-adventure, so requires page links and chapter breaks on almost every page) I recently used Calibre to convert the kindle prc into an epub, and the result reads beautifully on my Sony Reader. However, it fails epubcheck SPECTACULARLY with 694 errors (the Nook bookstore seems to have no problem with this, but to get it in the iBook store it needs to pass). The vast majority of the errors are: element "a" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context (Although sometimes it's a p element or a div element). The docs read fine in a browser, so my html can't be all that messed up. Any ideas? Thanks in advance for any advice! Matt Last edited by jmatthew; 01-04-2011 at 03:15 PM. |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,436
Karma: 5702578
Join Date: Nov 2009
Device: many
|
Hi,
My guess (without being able to see the actual file) is that you have anchor tags < a > that exist inside the < body > tag but that are not inside any other < div > or <p > tags. The xhtml spec basically says that inline tags can not be directly inside the body tag and should instead be inside a block tag of some sort (i.e p or div) tag. Any easy way to fix this is to run tidy and set the command switches for strict xhtml and to have it wrap these tags with either a div or a p. My guess for what it is worth. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Run it through Flightcrew. That one gives more sensible error messages and is much better in the checks.
It should give better clues and help you solve the problems. Use Sigil to solve things, this will make life easier... |
![]() |
![]() |
![]() |
#4 |
Enquiring Mind
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
|
Browsers will often handle and display documents which contain HTML that doesn't comply with the HTML specifications, so not always an accurate indication of how compliant the HTML is, I'm afraid. And in order to pass epubcheck, the HTML in an EPUB file has to be spec compliant.
The nature of the book, with lots of links to the different "story choices" throughout the book, makes me suspect that a lot of the errors might relate to the use of empty A elements as bookmarks which aren't contained within a block level element (such as a heading, or paragraph, or div). For example: Code:
<a name="section001"></a> <p>Text here.</p> Code:
<p id="section001">Text here.</p> |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre epub works fine on Reader, fails epubcheck spectacularly | jmatthew | Calibre | 2 | 01-04-2011 03:12 PM |
Calibre epub from recipe fails in Sigil and FBReader on Android | siebert | Calibre | 15 | 12-04-2010 11:18 AM |
epub date error fails epubcheck 1.05 | dkata | Calibre | 2 | 09-13-2010 04:21 AM |
To MOBI, Chapter detection fails? Works for EPUB | Fmstrat | Calibre | 7 | 08-29-2010 05:37 PM |
Calibre comic conversion yields poor results when target is epub; looks fine on LRF | acidzebra | Calibre | 2 | 08-17-2009 10:54 AM |