08-19-2017, 06:22 PM | #1 |
Member
Posts: 10
Karma: 10
Join Date: Aug 2017
Device: none
|
Epubcheck: New Error under upgrade to Validator 4.0.2
Manuscript templates that have worked for years have suddenly stopped working. Smashwords, Stealth, and others who have recently upgraded their epubcheck validation are all rejecting my epub files created in Calibre.
The error occurs immediately before each generation of a "Section Break". No problem with "Page Breaks". Two general types of errors occur, the first is a "Span" error. Here is the Error Warning Notice: Code:
Error while parsing file 'element "span" 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") Code:
<span class="calibre4"><span class="calibre5"><br class="calibre7"/> </span></span> Code:
<u><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:blue'><br style=''> </span></u> The second type of error is an 'element "b" not allowed here', and the Warning Error Notice is: Code:
Error while parsing file 'element "b" 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")'. Code:
<b><span style='font-size:12.0pt;font-family:"Arial","sans-serif"'><br style=''> </span></b> |
08-19-2017, 07:42 PM | #2 |
Grand Sorcerer
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
What version of calibre?
|
Advert | |
|
08-19-2017, 08:02 PM | #3 |
Resident Curmudgeon
Posts: 73,976
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
It's most likely the <br/> in the span that's the problem. You need to use prober styles in Word. Don't just highlight some text and click something in the toolbar. Word can make a real mess if you don't use it correctly. That mess then becomes a messy eBook that is not so easy to clean up. You should have clean code in your eBook.
One other thing, there's a plugin for Calibre's eBook editor to allow you to validate using epubcheck 4.0.2. Install that and it will help you not get rejected when online shops validate your eBook. Last edited by JSWolf; 08-19-2017 at 08:04 PM. |
08-19-2017, 08:31 PM | #4 |
Member
Posts: 10
Karma: 10
Join Date: Aug 2017
Device: none
|
Hello Sir,
Thanks. I've tried versions: calibre-64bit-3.3.0.msi calibre-64bit-3.6.0.msi Its definitely connected with the "Section Break" occurring immediately after. Its also definitely connected to the new updates in epubcheck validation now checking something it never checked before. Any assistance you could give would be appreciated. Thanks Phaedrus |
08-19-2017, 09:01 PM | #5 | |
Member
Posts: 10
Karma: 10
Join Date: Aug 2017
Device: none
|
Quote:
Any more suggestions? Phaedrus |
|
Advert | |
|
08-19-2017, 10:21 PM | #6 | |
Bibliophagist
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
One question that comes to mind is what is wrapped around those spans? Could you try adding a <p> or <div> at the start and </p> or </div> at the end of the error lines to see what that does for the error message? |
|
08-19-2017, 10:27 PM | #7 | |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Spans can not be Naked. They must be inside a block (level) |
|
08-19-2017, 11:54 PM | #8 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Dont convert word html, convert docx files directly. https://manual.calibre-ebook.com/faq...e-is-not-valid
|
08-20-2017, 04:49 AM | #9 | |
Member
Posts: 10
Karma: 10
Join Date: Aug 2017
Device: none
|
Quote:
Therefore we have always used the following string in a manually created TOC: Code:
//*[((name()='h1' or name()='h2' or name()='h3' or name()='h4' or name()='h5' or name()='h6' or name()='h7') and re:test(., '\s*((chapter|book|section|volume|part)\s+)|((A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9|Ą|Ć|Ę|Ł|Ń|Ó|Ś|Ź|Ż|ą|ć|ę|ł|ń|ó|ś|ź|ż)(\s+|$))', 'i')) or @class = 'chapter'] Is there a way to get Calibre to detect up to 6 or 7 levels of contents when converting to docx? If we could solve this, we would stop using the html format even though it gives us greater control in managing the output through various custom bat files and powershell scripts we run. Thanks for your time. |
|
08-20-2017, 05:00 AM | #10 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Simply create a Table of COntents in the docx file, and calibre will read that instead of trying to build it from headings. See the sameple docx file https://manual.calibre-ebook.com/con...word-documents
for an example of doing this. |
08-20-2017, 06:21 AM | #11 | |
Member
Posts: 10
Karma: 10
Join Date: Aug 2017
Device: none
|
Quote:
You have me convinced to make the change. Fiddling with the settings I was able to achieve the goal. We had been creating our own TOC's but Calibre had not been reading them below the 3rd level until now on any files except html. That part is now working. One last question if you don't mind my asking. Is there a way to make all heading level hyperlinks show up as black instead of blue, while allowing the internal links to outside web pages to remain blue? Thanks for your assistance. Phaedrus |
|
08-20-2017, 06:25 AM | #12 |
Resident Curmudgeon
Posts: 73,976
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Given that you are quite experienced with styles in Word, how did you end up with that sloppy code?
Last edited by JSWolf; 08-20-2017 at 06:32 AM. |
08-20-2017, 11:12 PM | #13 |
Bibliophagist
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
|
08-20-2017, 11:13 PM | #14 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use a style in word for heading hyperlinks that specifies the color as black.
|
08-21-2017, 05:50 AM | #15 |
Resident Curmudgeon
Posts: 73,976
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
Tags |
eliment error, epubcheck error, span error, validator 4.0.2 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help Epub validator error message | weavinator | ePub | 6 | 01-08-2016 01:10 AM |
Error epubcheck | Buble | ePub | 43 | 08-15-2014 01:53 AM |
Epub validator error code assistance | LGDesign | ePub | 3 | 03-09-2013 05:08 PM |
ePubCheck error deciphering | thiefwriter | Calibre | 5 | 09-15-2011 07:37 PM |
Error on epubcheck | Brazz | ePub | 5 | 09-01-2011 03:17 AM |