Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-15-2011, 09:23 PM   #1
thiefwriter
Member
thiefwriter began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2011
Device: formatting for all
ePub errors (attribute-type, element, text-not-allowed

My eBook looks great in ePub and Mobi tests, but ePubCheck and ThreePress gave me lots of errors. Taco HTML Edit shows no syntax errors, and examining the unzipped files, I couldn't see anything wrong with the element "i". Any ideas? Thank you in advance!

Quote:
ERROR: Travel Advisory_ How to Avoid Thefts, Cons, and Street Scams - Bambi Vincent & Bob Arno.epub/TravAd_split_017.html(9): attribute "type" not allowed here; expected attribute "class", "dir", "id", "style", "title" or "xml:lang"

ERROR: Travel Advisory_ How to Avoid Thefts, Cons, and Street Scams - Bambi Vincent & Bob Arno.epub/TravAd_split_017.html(9): element "p" not allowed here; expected element "li"

ERROR: Travel Advisory_ How to Avoid Thefts, Cons, and Street Scams - Bambi Vincent & Bob Arno.epub/TravAd_split_018.html(28): text 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")

ERROR: Travel Advisory_ How to Avoid Thefts, Cons, and Street Scams - Bambi Vincent & Bob Arno.epub/TravAd_split_018.html(28): 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")

ERROR: Travel Advisory_ How to Avoid Thefts, Cons, and Street Scams - Bambi Vincent & Bob Arno.epub/TravAd_split_018.html(29): text 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")
thiefwriter is offline   Reply With Quote
Old 09-15-2011, 10:07 PM   #2
Jim Lester
Evangelist
Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.
 
Jim Lester's Avatar
 
Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
what's in TravAd_split_017.html (about line 9 ), and TravAd_split_018.html (around lines 28 and 29)
Jim Lester is offline   Reply With Quote
Advert
Old 09-15-2011, 11:03 PM   #3
thiefwriter
Member
thiefwriter began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2011
Device: formatting for all
Inside the epub files:

Hi Jim,

Inside split 17 of the epub unzipped file is:

Code:
<ul type="square" class="calibre13"><p class="calibre3">
				</p><li class="calibre14"><b class="calibre16">
but in my html file, before calibre got it, is this:

Code:
<ul style="square">
				<li>
and in split 18 of the epub unzipped:

Code:
</p>
		In late 2011, National Geographic aired the documentary <i class="calibre5">Pickpocket King</i> about the couple’s work as “thiefhunters in paradise.” The paradise


while my original html file (before calibre) is:

Code:
In late 2011, National Geographic aired the documentary <i>Pickpocket King</i> about the couple&rsquo;s work as &ldquo;thiefhunters in paradise.&rdquo;
Calibre sure seems to have changed a lot of code. It also took away all the code for quotes, ellipsis, etc.
thiefwriter is offline   Reply With Quote
Old 09-16-2011, 12:43 AM   #4
Jim Lester
Evangelist
Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.
 
Jim Lester's Avatar
 
Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
First ePub requires XHTML, not HTML, and XHTML is stricter about what goes where.

For the first one, 'p' is not a valid child element of ul, only li is (for XHTML, that is). It looks like Calibre is inserting a p element to take care of whitespace, which it would've been better to ignore (but that's just a guess). I would think about submitting a bug to Koval (depending upon the original source)

For the second one text is not allowed outside of enclosing block element such as 'p' or 'div', from the closing 'p' tag in the original that you show, this is most likely a problem in your original content.

Running your original content through a XHTML validator may help.
Jim Lester is offline   Reply With Quote
Old 09-16-2011, 01:13 AM   #5
thiefwriter
Member
thiefwriter began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2011
Device: formatting for all
Thank you

Thank you Jim. You've given me a lot to go on. I'll work on it Friday and report back—I hope with success instead of more questions.
thiefwriter is offline   Reply With Quote
Advert
Old 09-17-2011, 11:02 AM   #6
thiefwriter
Member
thiefwriter began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2011
Device: formatting for all
Jim, you were absolutely right about the blank line. Once I removed them (and changed ids to classes), I got an error-free epub. Thanks so much for the help.
thiefwriter is offline   Reply With Quote
Reply

Tags
epub, errors


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
element "img" not allowed in this context graniton Calibre 5 05-14-2012 11:39 PM
ePub to Mobi: can't get the reference type="text" to work LaoTseu Conversion 7 09-14-2011 12:06 AM
Type element usage Giordano Galli ePub 3 09-06-2011 11:32 AM
element "span" not allowed in this context jihwan Calibre 4 07-17-2010 09:25 PM
tag <br /> causes epubeck error: attribute clear not allowed georg3200 ePub 21 11-19-2009 08:50 PM


All times are GMT -4. The time now is 10:29 PM.


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