Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 08-31-2018, 10:52 AM   #1
bilbaxo
Junior Member
bilbaxo began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2016
Device: none
epub validation

Hello
I create an Epub with Caibre and I can't validate it at google books.
I have the following messages :
index_split_004.html:12, 2: Error while parsing file 'text not allowed here.
index_split_005.html:14, 2: Error while parsing file 'text not allowed here.
index_split_006.html:12, 83: Error while parsing file 'text not allowed here.
index_split_007.html:13, 2: Error while parsing file 'text not allowed here.
.............................and so on
index_split_051.html:12, 130: Error while parsing file 'text not allowed here.
index_split_052.html:13, 2: Error while parsing file 'text not allowed here.
The same for every part of my book.

I look at the head of my files :
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<link href="page_styles.css" rel="stylesheet" type="text/css">
</head>
Which is the same for all the files and also the same as many previous books which were accepted without problem and tried many variations...
I spent many hours about this problem but I don't find any solution...
Some help ?
bilbaxo is offline   Reply With Quote
Old 08-31-2018, 12:46 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Each of those messages has:
a file name
a row and column where the error was PERCEIVED

The actual error may have happened earlier, but only till it reached a point where something NEW was to happen that would now be impossible (typ unbalanced tags. you are trying to close more than were open ).

In this case
Look for naked text (tagless) , missing/wrong type quotes, colon vs semicolon.

If you use the calibre editors check tool (the bug icon), double click the error message: it should take you to the line with the error (as noted above)
theducks is offline   Reply With Quote
Advert
Old 08-31-2018, 01:12 PM   #3
Sarmat89
Evangelist
Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.
 
Posts: 482
Karma: 2267928
Join Date: Nov 2015
Device: none
Calibre often puts text inside blockquotes, which is disallowed in EPUB2.
Sarmat89 is offline   Reply With Quote
Old 09-03-2018, 03:13 AM   #4
bilbaxo
Junior Member
bilbaxo began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2016
Device: none
thank's for your help.
for 2 of my ebooks, the verification is ok (no problem at all)
for one, this message : index_split_003.html (ligne : 9) which is :
<body class="calibre">
???
and for the line/column information, I found no problem in the code...
I join a file with his message :

the message :
index_split_005.html:10, 282: Error while parsing file 'text not allowed here; expected 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")'.
the file :
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>J'apprends à me servir de Sage paie I7 V9</title>

<link href="styles/stylesheet.css" rel="stylesheet" type="text/css"/>
<link href="styles/page_styles.css" rel="stylesheet" type="text/css"/>
</head>
<body class="calibre">
<p id="filepos132725" class="calibre_43"><span class="calibre7"><span class="bold"><span class="calibre_44">II. SAGE PAIE POUR QUOI FAIRE</span></span></span></p><p id="filepos132861" class="calibre_4"><span class="calibre2"><span class="bold"><span class="calibre_5"><span class="calibre_6">A. CONFIGURATION OPTIMALE</span></span></span></span></p><blockquote class="calibre_7"><span class="calibre1">LA CONFIGURATION CONSEILLÉE EST LA SUIVANTE :</span></blockquote><blockquote class="calibre_7">ü<span class="calibre4">* </span>ordinateur de type pentium™ à plusieurs noyaux de 2 à 4 GHz avec Windows 10</blockquote><blockquote class="calibre_7">ü<span class="calibre4">* </span>mémoire vive de 6 à 24 Go </blockquote><blockquote class="calibre_7">ü<span class="calibre4">* </span>écran plat large de 19" à 24" résolution 1680/1050 - couleurs 32 bits</blockquote><blockquote class="calibre_7">ü<span class="calibre4">* </span>disque dur 1* To / Ssd 250 Go</blockquote><blockquote class="calibre_7">ü<span class="calibre4">* </span>Lecteur-graveur Dvd/BlueRay</blockquote><blockquote class="calibre_7">ü<span class="calibre4">* </span>Souris Laser 2 boutons + roulette de qualité</blockquote><blockquote class="calibre_7">ü<span class="calibre4">* </span>Accès internet</blockquote><blockquote class="calibre_19"><blockquote class="calibre6"><blockquote class="calibre6"><blockquote class="calibre_20"><span class="calibre3"><span class="italic">*</span></span></blockquote></blockquote></blockquote></blockquote><blockquote class="calibre_21"><img src="images/00525.jpg" class="calibre_25"/><span class="calibre4"><span class="italic"><span class="bold"><span class="calibre_18">***** </span></span></span></span><span class="calibre1"><span class="calibre_26">Plus l'ordinateur sera puissant et mieux il sera équipé, plus agréable sera l'utilisation de sage paie</span></span></blockquote><div class="mbp_pagebreak" id="calibre_pb_10"></div>
</body></html>
bilbaxo is offline   Reply With Quote
Old 09-03-2018, 11:29 AM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
That is very hard on the eyes

Please 'pretty' up the source text (at least for that file) by using the flower icon
The one in the edit window, does just the file. the one on the Main EDITOR window, does the document.


some place near the 280th character, the error became apparant.
most likely, a missing closing tag (or on the wrong side of some text)
theducks is offline   Reply With Quote
Advert
Old 09-03-2018, 12:13 PM   #6
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: 35,428
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
One item that pops out for me is that you are using <blockquote><span> and <blockquote>text which was legitimate in early HTML however XHTML only allows block-level elements within blockquotes, see XHTML 1.0 Block-Level Elements and Why this code showing error in W3C validator? for more information. I did a quick edit and pretty print on your post and it validates for me with only errors about missing items. Unless you are planning on entering an obfuscated code contest, pretty printing is a great idea. In your sample, your entire page below the <body> tag was a single line making it much harder to locate errors.

Spoiler:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>J'apprends à me servir de Sage paie I7 V9</title>
  <link href="styles/stylesheet.css" rel="stylesheet" type="text/css"/>
  <link href="styles/page_styles.css" rel="stylesheet" type="text/css"/>
</head>

<body class="calibre">
  <p id="filepos132725" class="calibre_43"><span class="calibre7"><span class="bold"><span class="calibre_44">II. SAGE PAIE POUR QUOI FAIRE</span></span></span></p>

  <p id="filepos132861" class="calibre_4"><span class="calibre2"><span class="bold"><span class="calibre_5"><span class="calibre_6">A. CONFIGURATION OPTIMALE</span></span></span></span></p>

  <blockquote>
    <p class="calibre_7"><span class="calibre1">LA CONFIGURATION CONSEILLÉE EST LA SUIVANTE :</span></p>
  </blockquote>

  <blockquote>
    <p class="calibre_7">ü<span class="calibre4">* </span>ordinateur de type pentium™ à plusieurs noyaux de 2 à 4 GHz avec Windows 10</p>
  </blockquote>

  <blockquote>
    <p class="calibre_7">ü<span class="calibre4">* </span>mémoire vive de 6 à 24 Go</p>
  </blockquote>

  <blockquote>
    <p class="calibre_7">ü<span class="calibre4">* </span>écran plat large de 19" à 24" résolution 1680/1050 - couleurs 32 bits</p>
  </blockquote>

  <blockquote>
    <p class="calibre_7">ü<span class="calibre4">* </span>disque dur 1* To / Ssd 250 Go</p>
  </blockquote>

  <blockquote>
    <p class="calibre_7">ü<span class="calibre4">* </span>Lecteur-graveur Dvd/BlueRay</p>
  </blockquote>

  <blockquote>
    <p class="calibre_7">ü<span class="calibre4">* </span>Souris Laser 2 boutons + roulette de qualité</p>
  </blockquote>

  <blockquote>
    <p class="calibre_7">ü<span class="calibre4">* </span>Accès internet</p>
  </blockquote>

  <blockquote class="calibre_19">
    <blockquote class="calibre6">
      <blockquote class="calibre6">
        <blockquote>
          <p class="calibre_20"><span class="calibre3"><span class="italic">*</span></span></p>
        </blockquote>
      </blockquote>
    </blockquote>
  </blockquote>

  <blockquote>
    <p class="calibre_21"><img src="images/00525.jpg" class="calibre_25"/><span class="calibre4"><span class="italic"><span class="bold"><span class="calibre_18">***** </span></span></span></span><span class="calibre1"><span class="calibre_26">Plus l'ordinateur sera puissant et mieux il sera équipé, plus agréable sera l'utilisation de sage paie</span></span></p>
  </blockquote>

  <div class="mbp_pagebreak" id="calibre_pb_10"></div>
</body>
</html>

Last edited by DNSB; 09-03-2018 at 12:22 PM. Reason: Fat fingers cause typos...
DNSB is offline   Reply With Quote
Old 09-04-2018, 10:07 AM   #7
bilbaxo
Junior Member
bilbaxo began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2016
Device: none
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 ?
bilbaxo is offline   Reply With Quote
Old 09-04-2018, 05:24 PM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,570
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@bilbaxo - if you have a document in DOCX I suggest you convert that to EPUB directly, see ==>> FAQ: What are the best source formats to convert?.

Whilst DOCX is only one place higher than HTML in that list, the quality of output from conversion is significant - IMO.

BR
BetterRed is offline   Reply With Quote
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: 35,428
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, 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
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EPUB Validation error after DOC>EPUB conversion djkmann Conversion 5 11-29-2016 09:42 AM
Validation in epub esack ePub 16 07-11-2015 09:48 PM
ePub Validation odedta ePub 7 12-19-2013 06:45 AM
Epub 3 validation carl_torstensson ePub 11 02-14-2012 06:00 AM
epub validation error sassanik Sigil 19 12-08-2010 05:46 AM


All times are GMT -4. The time now is 06:36 AM.


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