Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-09-2010, 08:59 PM   #1
mrbillb
Member
mrbillb began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2010
Device: iPad
Calibre Conversion Errors

I have been receiving epub validation errors which I have finally determined are occurring during the Calibre conversion process:

Code snippets are shown below:

In the original html file:

<h3 id="L342067"><a id="AppendixY"></a>Appendix Y: Resetting a Decoder to
Factory Defaults</h3>
<p>This procedure applies to all Digitrax FX3 decoders. See your decoder manual
for the procedure specific to your decoder.</p>
<br />

In the Calibre Debug Input directory:

<h3 id="L342067"><a id="AppendixY"></a>Appendix Y: Resetting a Decoder to
Factory Defaults</h3>
This procedure applies to all Digitrax FX3 decoders. See your decoder manual
for the procedure specific to your decoder. <br/>
<br/>
In the Calibre Parsed directory:

<h3 id="L342067"><a id="AppendixY"></a>Appendix Y: Resetting a Decoder to
Factory Defaults</h3>
This procedure applies to all Digitrax FX3 decoders. See your decoder manual
for the procedure specific to your decoder. <br/>
<br/>

In the Calibre Processed directory:

<h3 id="L342067" class="calibre12"><a id="AppendixY"></a>Appendix Y: Resetting a Decoder to
Factory Defaults</h3>
This procedure applies to all Digitrax FX3 decoders. See your decoder manual
for the procedure specific to your decoder. <br class="bodytext"/>
<br class="bodytext"/>

In the Calibre Structure directory:

<h3 id="L342067"><a id="AppendixY"></a>Appendix Y: Resetting a Decoder to
Factory Defaults</h3>
This procedure applies to all Digitrax FX3 decoders. See your decoder manual
for the procedure specific to your decoder. <br/>
<br/>

The error messages at Threepress.org have referenced non-existent line numbers so the errors have not been east to find.

Any ideas?
mrbillb is offline   Reply With Quote
Old 09-09-2010, 09:11 PM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by mrbillb View Post
The error messages at Threepress.org have referenced non-existent line numbers so the errors have not been east to find.

Any ideas?
First the line numbers are not non-existent, but I have yet to develop mind reading skills. Any chance you might actually share the error message with us?
DoctorOhh is offline   Reply With Quote
Advert
Old 09-09-2010, 11:28 PM   #3
mrbillb
Member
mrbillb began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2010
Device: iPad
Quote:
Originally Posted by dwanthny View Post
First the line numbers are not non-existent, but I have yet to develop mind reading skills. Any chance you might actually share the error message with us?
Here are the errors which correspond to the code shown above:

ERROR: A Visual Guide to Mastering the Digitrax Zephyr - William H. Bradley_ Loy Spurlock.epub/zephyr_split_001.html(2959): element "br" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
ERROR: A Visual Guide to Mastering the Digitrax Zephyr - William H. Bradley_ Loy Spurlock.epub/zephyr_split_001.html(2967): element "br" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
ERROR: A Visual Guide to Mastering the Digitrax Zephyr - William H. Bradley_ Loy Spurlock.epub/zephyr_split_001.html(3038): element "br" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context

Here are the last 4 lines of zephyr_split_001.html

2441 <p class="bodytext1 calibre10 calibre9 sgc-2"><img alt="The End" class="calibre97" src="../Images/bumping-post.jpg" /></p>
2442 </body>

Lines 2959, 2967, and 3038 do not exist in the file, which ends at line 2444. That's why I called them non-existent.

2443 </html>
2444

That being said, you missed the point of the post. I was more interested in the bogus code Calibre inserted in the file, since it is the cause of the error messages. If I use Sigil to remove the Calibre-inserted code from the epub file, the errors go away.
mrbillb is offline   Reply With Quote
Old 09-10-2010, 02:11 AM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by mrbillb View Post
That being said, you missed the point of the post. I was more interested in the bogus code Calibre inserted in the file, since it is the cause of the error messages. If I use Sigil to remove the Calibre-inserted code from the epub file, the errors go away.
I didn't see any bogus code, what code are you removing? Obviously removing the <br> codes should prevent this error but <br> codes by themselves are not bogus code and you did have a <br> code in the original html.

What did you convert from?

It was my impression that as long as the encoding was correct, that the html input and the Calibre Debug Input directory would contain the same code. Since this isn't correct what does the the html code look like inside the zip file in the calibre directory for this book. There is encoding that takes place when adding a html book prior to any conversions.

Last edited by DoctorOhh; 09-10-2010 at 02:26 AM.
DoctorOhh is offline   Reply With Quote
Old 09-10-2010, 02:24 AM   #5
mrbillb
Member
mrbillb began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2010
Device: iPad
Here are two of the lines I edit so it will pass epub verification:

<p><br class="bodytext" /></p>

<p><br class="bodytext" /></p>

I change each of them to <p></p>

This is the third one:
<li class="bodytext6">Place the locomotive on your service-mode programming track.<br class="bodytext" />

I change it as follows:
<li class="bodytext6">Place the locomotive on your service-mode programming track.<br />

With these changes, epub verification passes without the "br" errors.
mrbillb is offline   Reply With Quote
Advert
Old 09-10-2010, 02:30 AM   #6
mrbillb
Member
mrbillb began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2010
Device: iPad
Your reply did not address the error messages which refer to lines which are not in the file. The first error is actually at line 1422, not at line 2959 as stated in the error message. The second error is at line 1428, not at line 2967 as the error message says, and the third error is at line 1433 instead of line 3038.
mrbillb is offline   Reply With Quote
Old 09-10-2010, 02:39 AM   #7
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by mrbillb View Post
Your reply did not address the error messages which refer to lines which are not in the file. The first error is actually at line 1422, not at line 2959 as stated in the error message. The second error is at line 1428, not at line 2967 as the error message says, and the third error is at line 1433 instead of line 3038.
You'd have to take that up with whatever group created the results or you can download epubcheck and run it yourself.

Quote:
Originally Posted by mrbillb View Post
<li class="bodytext6">Place the locomotive on your service-mode programming track.<br class="bodytext" />

I change it as follows:
<li class="bodytext6">Place the locomotive on your service-mode programming track.<br />

With these changes, epub verification passes without the "br" errors.
So your just removing the "class" and it passes validation? Fascinating, I'm not a html guru, but last time I checked the class attribute was one of the acceptable attributes for <br> tags.

It might help if you can make and attach a small html file and attach the converted epub sample that fails the validation with the associated errors so we can all have full context.

If you can create this maybe Kovid can shed some light.

Last edited by DoctorOhh; 09-10-2010 at 02:45 AM.
DoctorOhh is offline   Reply With Quote
Old 09-10-2010, 04:39 AM   #8
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
dwanthny: I had a not totally dissimilar problem with using breaks and getting validation error which had naught to do with Calibre; I had to assign it a class ("end," which I created to clear:all) and, of equal importance, I couldn't have them hanging about; they had to be enclosed within another element, i.e., a p tag or a blockquote or a div or what-have-you. That error message *normally* means that the element is used outside of its proper context; the example usually given is a <tr> outside of a table.

Oh, mrbillb: my Epubcheck line #'s never match up to my actual line #s in Sigil. {shrug}.

HTH.

Hitch
Hitch is offline   Reply With Quote
Old 09-10-2010, 04:47 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That error means you have a <br> tag as a direct child of <body> instead of inside a <p> or a <div>, as Hitch pointed out.
kovidgoyal is online now   Reply With Quote
Old 09-10-2010, 01:51 PM   #10
mrbillb
Member
mrbillb began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2010
Device: iPad
Quote:
Originally Posted by Hitch View Post
dwanthny: I had a not totally dissimilar problem with using breaks and getting validation error which had naught to do with Calibre; I had to assign it a class ("end," which I created to clear:all) and, of equal importance, I couldn't have them hanging about; they had to be enclosed within another element, i.e., a p tag or a blockquote or a div or what-have-you. That error message *normally* means that the element is used outside of its proper context; the example usually given is a <tr> outside of a table.

Oh, mrbillb: my Epubcheck line #'s never match up to my actual line #s in Sigil. {shrug}.

HTH.

Hitch
I guess that information about the line numbers good to know.
I really appreciate the input. Some replies have said Sigil renumbers the lines, but that made no sense.
mrbillb is offline   Reply With Quote
Old 09-10-2010, 01:55 PM   #11
mrbillb
Member
mrbillb began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2010
Device: iPad
Quote:
Originally Posted by kovidgoyal View Post
That error means you have a <br> tag as a direct child of <body> instead of inside a <p> or a <div>, as Hitch pointed out.
Two of those errors were inside a <p>.
mrbillb is offline   Reply With Quote
Old 09-10-2010, 01:59 PM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by mrbillb View Post
Two of those errors were inside a <p>.
Then you should opena bug report with epubcheck
kovidgoyal is online now   Reply With Quote
Old 09-10-2010, 06:37 PM   #13
mrbillb
Member
mrbillb began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2010
Device: iPad
Quote:
Originally Posted by kovidgoyal View Post
Then you should opena bug report with epubcheck
Actually, the errors were introduced during the Calibre conversion process. My post that began this thread first shows the errors appearing in the Processed directory.
mrbillb is offline   Reply With Quote
Old 09-10-2010, 09:19 PM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Having a class attribute on a br tag is not an error.
kovidgoyal is online now   Reply With Quote
Old 09-10-2010, 11:03 PM   #15
mrbillb
Member
mrbillb began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2010
Device: iPad
Quote:
Originally Posted by kovidgoyal View Post
Having a class attribute on a br tag is not an error.
I understand that, but why is Calibre inserting the code? It was not in my html source file. I can make those three lines pass validation by removing the code inserted by Calibre.
mrbillb is offline   Reply With Quote
Reply

Tags
calibre conversion error, epub validation

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion to Mobi to ePub errors erik_reader Conversion 5 08-07-2010 02:03 AM
Calibre errors on one PC, not another Katelyn Calibre 12 07-13-2009 09:09 PM
Calibre conversion errors? nick_f Sony Reader 2 03-03-2009 05:44 AM
Conversion errors (encoding?) Dave Berk Calibre 3 11-25-2008 02:23 PM
calibre 0.4.76 news errors alexxxm Calibre 1 07-03-2008 11:12 AM


All times are GMT -4. The time now is 11:04 PM.


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