Thread: epub validation
View Single Post
Old 09-04-2018, 10:21 PM   #9
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,665
Karma: 169712392
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by bilbaxo View Post
I agree ; the code is awfull. But it comes for a word document transformed in html and already cleaned and the <blockquote> are all created by calibre conversion.
And the calibre verification is ok.
And no, i don't find any misssing character and how coult it be the same error in every file of the book ?
I'm sorry but I can only say what I see in your code. XHTML is much stricter in it's requirements than earlier HTML implementations. While once you could use:

Code:
<blockquote><i>this is a text string</i></blockquote>
now you need to use:

Code:
<blockquote><block-level element><i>this is a text string</i></block-level element></blockquote>
or your code will not validate. I would recommend installing the epubcheck plugin for the calibre editor. Whether or not some people think it is a piece of crap, it is what almost all sites use to validate epubs and it will catch quite a few errors that the builtin check in calibre does not. As for calibre conversion, it is not going to catch and fix quite a few possible errors in your code -- GIGO lives.

As for the same error? If the sample you supplied is anything to go by, you have <blockquote> followed by naked text and/or non block-level elements. One line you supplied and I corrected was:

Code:
 <blockquote class="calibre_7">ü<span class="calibre4">* </span>Souris Laser 2 boutons + roulette de qualité</blockquote>
Notice the text ü immediately after the <blockquote>? Notice the <span> tags? Notice the lack of any block-level element inside the blockquote tags? If this is typical of all your files, they will not validate on any site that uses epubcheck or similar to validate your ebook.

And again, pretty-printing makes it much easier to read your code. This is not the obfuscated C contest.

Last edited by DNSB; 09-04-2018 at 10:30 PM.
DNSB is offline   Reply With Quote