View Full Version : Error Message Has Wrong Line Number


mrbillb
09-06-2010, 05:07 PM
The following error messages were generated by ePub validation at threepress.org:

ERROR: A Visual Guide to Mastering the Digitrax Zephyr.epub/content.opf(12): date value '2010-09-06T05:00:00+00:00' is not valid, YYYY[-MM[-DD]] expected
ERROR: A Visual Guide to Mastering the Digitrax Zephyr.epub/zephyr_split_030.htm(2466): element "img" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
ERROR: A Visual Guide to Mastering the Digitrax Zephyr.epub/zephyr_split_030.htm(2466): element "strong" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
ERROR: A Visual Guide to Mastering the Digitrax Zephyr .epub/zephyr_split_030.htm(2468): element "sup" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
ERROR: A Visual Guide to Mastering the Digitrax Zephyr.epub/zephyr_split_030.htm(2468): element "strong" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
ERROR: A Visual Guide to Mastering the Digitrax Zephyr.epub/zephyr_split_030.htm(2469): element "img" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
ERROR: A Visual Guide to Mastering the Digitrax Zephyr.epub/zephyr_split_030.htm(2469): element "br" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
ERROR: A Visual Guide to Mastering the Digitrax Zephyr.epub/zephyr_split_030.htm(2470): element "br" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
Check finished with warnings or errors!

The problem with all but the first error is that zephyr_split_030.htm has only 1251 lines! Supposedly, the number in parentheses is the line containing the error, but with Sigil I can see only 1250 lines.

Now for the first line. Where is "content.opf". Sigil does not list it within the "epub" file.

Any ideas?

Valloric
09-06-2010, 05:51 PM
The problem with all but the first error is that zephyr_split_030.htm has only 1251 lines! Supposedly, the number in parentheses is the line containing the error, but with Sigil I can see only 1250 lines.

Sigil reformats the source when you open an epub. The line numbers won't match.


Now for the first line. Where is "content.opf". Sigil does not list it within the "epub" file.

This is an epub infrastructure file. You can see it by opening the epub with any zip tool.

mrbillb
09-07-2010, 08:38 PM
The line numbers must be off by at least 1200 if that is the cause. Could they possibly refer to line numbers in the original "htm" file? That does not seem to be the case. If the error messages do not refer to the correct file and the correct line, they are virtually useless.

charleski
09-08-2010, 05:28 AM
Check that file again. I suspect some sort of junk has got itself inserted near the end. The errors you're seeing are possibly due to code being present after the closing </body> tag. The date error is a bug in threepress' epubcheck, which doesn't recognise the full W3CDTF date code that calibre uses.

jharker
09-08-2010, 12:45 PM
Generally speaking, if you want to check errors then I recommend unzipping the actual ePub and opening the relevant xhtml file in a text editor. On Windows, I think Notepad++ (http://notepad-plus-plus.org/) is highly useful for this kind of quick and dirty debugging.

mrbillb
09-08-2010, 05:58 PM
Generally speaking, if you want to check errors then I recommend unzipping the actual ePub and opening the relevant xhtml file in a text editor. On Windows, I think Notepad++ (http://notepad-plus-plus.org/) is highly useful for this kind of quick and dirty debugging.

That's what I have been doing, but with Sigil. I'll try it with gedit next.