![]() |
#1 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Mar 2025
Device: PocketBook Basic
|
Error in epub file generated by Sigil
I have tried to upload an epub file generated by Sigil on Google Books Partner Center and I get the following error message (excerpt):
Code:
Required: Fix ePub and resubmit The ePub you submitted has the following errors. These will prevent the book from going live. See the Help Center for more information. Please correct and resubmit. index_split_003.html:55, 248: Error while parsing file: attribute "role" not allowed here; expected attribute "accesskey", "charset", "coords", "dir", "hreflang", "lang", "rel", "rev", "shape", "style", "tabindex", "target", "type" or "xml:lang" ... index_split_009.html:175, 288: Error while parsing file: attribute "data-docx-vert" not allowed here; expected attribute "accesskey", "charset", "class", "coords", "dir", "href", "hreflang", "id", "lang", "rel", "rev", "shape", "style", "tabindex", "target", "title", "type" or "xml:lang" |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,335
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Sigil will not generate role or data-docx-vert attributes. Those had to come from somewhere else. The last looks like it might be xml from a Word document. But regardless, I don't think they're epub spec compliant. The solution is to remove the two attributes and their values. Use spans and superscript css to accomplish what data-docx-vert="sup" seems to be trying to achieve.
Somewhere along the the line, a docx to epub conversion is leaving non-compliant markup behind. Last edited by DiapDealer; 03-09-2025 at 09:46 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,434
Karma: 5702578
Join Date: Nov 2009
Device: many
|
Sigil itself does not auto generate error free epubs as it depends on the errors introduced by the user in his/her xhtml. The *user* of Sigil can generate error free epubs using Sigil to track down and fix errors. Have you tried using Sigil's epubcheck plugin to help you track down and fix your errors?
Last edited by KevinH; 03-09-2025 at 10:30 AM. |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,679
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
@Mazarin07 The role and data-* attributes were introduced in the HTML5 specs. I.e., they can only be used in epub3 books.
A relatively easy fix would be to convert your epub2 book to an epub3 book with KevinH's ePub3-itizer plugin. |
![]() |
![]() |
![]() |
#5 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,434
Karma: 5702578
Join Date: Nov 2009
Device: many
|
And data attributes are generally used to add non-visible to the reader additional information that is typically accessed via javascript. And javascript is only available in epub3 readers and is technically not allowed in epub2 epubs.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Mar 2025
Device: PocketBook Basic
|
Quote:
|
|
![]() |
![]() |
![]() |
#7 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,446
Karma: 167726581
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Depending on what ePub3 features you use, you may have to add fallback code for ePub2. In most cases, simply adding the toc.ncx ePub2 navigation document is all that is needed since an ePub2 renderer will simply disregard ePub3 specific items. An example is that drop caps or small caps first phrases on the first paragraph may not show but the ebook will still be readable.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil Error Message: Book File Would Not Open in Sigil | fkustaa | Sigil | 9 | 04-27-2025 05:11 AM |
ePub3 to Mobi Error - Error(prcgen):E21027: Epub file has more than one opf file | dtsmith | Kindle Formats | 4 | 01-30-2018 11:20 AM |
error from Sigil when loading particular epub file | JohnNC | Sigil | 15 | 08-08-2017 04:52 AM |
Vexing error in EPUB file created in Sigil | pstjmack | ePub | 7 | 08-02-2016 12:47 PM |
"PK": Only text when I open in Sigil an ePub file generated with Calibre | Terisa de morgan | Sigil | 3 | 12-14-2009 11:24 AM |