![]() |
#1 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Dec 2023
Device: Iphone
|
Unable to publish Epub to Google Play due to html issue
Hello! I am hoping someone can offer me some advice. I am trying to publish my ebook on google play but they are rejecting it due to what seems to be an html issues on two lines in the document. I have checked myself and run an epub checker through amazon and nothing seems to actually be wrong. Does anyone else know about this? I have shared the errors below:
GoogleDoc/TheGoodSamaritan_FINAL_EBook.xhtml:292, 59: Error while parsing file: element "hr" not allowed here; expected the element end-tag, text, element "a", "abbr", "area", "audio", "b", "bdi", "bdo", "br", "button", "canvas", "cite", "code", "data", "datalist", "del", "dfn", "em", "embed", "i", "iframe", "img", "input", "ins", "kbd", "label", "link", "map", "mark", "meta", "meter", "ns1:switch", "ns2:math", "ns3:svg", "object", "output", "picture", "progress", "q", "ruby", "s", "samp", "script", "select", "small", "span", "strong", "sub", "sup", "template", "textarea", "time", "u", "var", "video" or "wbr" (with xmlns:ns1="http://www.idpf.org/2007/ops" xmlns:ns2="http://www.w3.org/1998/Math/MathML" xmlns:ns3="http://www.w3.org/2000/svg") or an element from another namespace GoogleDoc/TheGoodSamaritan_FINAL_EBook.xhtml:344, 59: Error while parsing file: element "hr" not allowed here; expected the element end-tag, text, element "a", "abbr", "area", "audio", "b", "bdi", "bdo", "br", "button", "canvas", "cite", "code", "data", "datalist", "del", "dfn", "em", "embed", "i", "iframe", "img", "input", "ins", "kbd", "label", "link", "map", "mark", "meta", "meter", "ns1:switch", "ns2:math", "ns3:svg", "object", "output", "picture", "progress", "q", "ruby", "s", "samp", "script", "select", "small", "span", "strong", "sub", "sup", "template", "textarea", "time", "u", "var", "video" or "wbr" (with xmlns:ns1="http://www.idpf.org/2007/ops" xmlns:ns2="http://www.w3.org/1998/Math/MathML" xmlns:ns3="http://www.w3.org/2000/svg") or an element from another namespace |
![]() |
![]() |
![]() |
#2 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,160
Karma: 18843349
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Welcome to MR!!
It looks like you are putting an <hr/> tag in an incorrect location. It should be all by itself, not embedded inside a <p> or <div> tag. Code:
Wrong: <body> <div>yadda yadda. <hr/></div> <p>yadda yadda. <hr/></p> <span>yadda yadda. <hr/></span> </body> Correct: <body> <div>yadda yadda.</div> <hr/> <p>yadda yadda.</p> <hr/> </body> If that doesn’t fix the problem, could you post the section of html that is causing the problem, not just the error code. Cheers! |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 436
Karma: 7446396
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe
|
Quote:
<hr /> can appear where many of the elements listed in the the error can appear, because they are all "flow content": https://www.w3.org/TR/2011/WD-html5-...l#flow-content Google Books seems to be expecting "phrasing content", but there is no explicit rule that says that "flow content" elements cannot appear inside of other "flow content" elements. For example, we all know that div and p can contain other flow content, like blockquote and table. Essentially, there is nothing special about div and p, according to the HTML standard, and there is no rule that only "phrasing content" can appear within "flow content". |
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Dec 2023
Device: Iphone
|
Thank you both for your responses. I should have mentioned in my original message: I know exactly nothing about html. I have no idea how to access whatever html code is contained within my google doc. Are you able to tell me how to alter the code to resolve this issue?
|
![]() |
![]() |
![]() |
#5 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,528
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
"The P element represents a paragraph. It cannot contain block-level elements (including P itself)." |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,160
Karma: 18843349
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
In the meantime I would recommend installing one of the free ePub editors: Sigil or Calibre - they have their own threads here on MR. Then you can open the ePub with that software and see the different parts and pieces. From there you can search for <hr and see where the problem is. Edit: I would start looking at lines 292 and 344 in the html file titled: TheGoodSamaritan_FINAL_EBook.xhtml Last edited by Turtle91; 12-14-2023 at 03:55 PM. |
|
![]() |
![]() |
![]() |
#7 | ||
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 436
Karma: 7446396
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe
|
Quote:
And, the EPUB spec says that specifically: Quote:
|
||
![]() |
![]() |
![]() |
#8 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,528
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
If you're stuck with EPUB2, you're stuck with XHTML 1.1 too (or with whatever subset the reading application supports).
Anyway, about HTML 5: Quote:
Whereas the div element says (https://html.spec.whatwg.org/multipa...-div-element): "Content model: [...] If the element is not a child of a dl element: flow content." So it seems to me there's still something special about the p element, it can only contain "phrasing content" and not "flow content", as the div element can. |
|
![]() |
![]() |
![]() |
#9 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,635
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Last edited by Doitsu; 12-16-2023 at 01:21 AM. |
|
![]() |
![]() |
![]() |
#10 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
In my experience, Google Play sells so few books that a heroic effort to comply with its rather odd uploading requirements isn't justified by the income a book generates. If it goes smoothly, I don't mind following Google's little rituals, but if it doesn't go smoothly, I forget it and move on.
When Google first began offering e-publication, there was great alarm on the Kindle message board that Google would end Kindle's dominance. Didn't quite work out that way! For me, it ranks down there with Hoopla as a money-maker. |
![]() |
![]() |
![]() |
#11 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,694
Karma: 134319572
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
When you create an eBook, the way to do it is to keep it simple. For example, in CSS for ePub 3, you can use rem instead of em. But don't when em works in so many more cases and it's the same thing. There are times when you will want to use something that won't work in older software (or some software). So in that case, you use fallbacks where possible. The way to do it (IMHO) is to install ADE 2.0.1 and look at your eBook with that and see how it looks. That way you'll know it's good enough for older software. You don't want your book to fail on older software. Look at Standard EBooks. They use the most convoluted code on eBooks where the formatting is very simple. They problem is that their eBooks fail to display properly a lot of the time. And in the case of older ADE such as on Kobo and Sony Readers, they fail completely. There's no need for this. So keep the code as simple as possible so it works in most cases. Don't use the latest and greatest code just because the program you are using to view may support it. If you find it works best, create an ePub 2 and convert to ePub 3 for the accessibility. But always make any ePub 3 backwards compatible with ePub 2 and make sure the eBook works well enough (even if not perfect) with ePub 2. |
|
![]() |
![]() |
![]() |
Tags |
epub, google, html, publishing |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Anyone else unable to log in to the Google Play store? | 4691mls | Windows Devices | 4 | 06-14-2022 09:05 PM |
Google Play Books and Nested Lists - Some Weird Display Issue | rsuchwani | ePub | 80 | 10-10-2021 03:08 PM |
Onyx N96ML - FBreader unable to update on Google Play??? | stardest | Onyx Boox | 9 | 06-04-2016 02:19 PM |
Loading eBooks to Google Play Issue | SamL | Android Devices | 3 | 02-15-2014 02:48 PM |
Test EPUB files using Google Play | Morganucopia | ePub | 9 | 06-29-2013 08:13 AM |