|
|
Thread Tools | Search this Thread |
05-17-2023, 01:40 AM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Sep 2022
Device: none
|
40+ Errors from epubcheck telling me that element "figure" not allowed here
Hi!
I am working on hopefully the last stages of this ebook, and I'm getting an issue where epubcheck 5.0.1 is telling me that Code:
ERROR(RSC-005): ... /Chapter2.html(72,315): Error while parsing file: element "figure" not allowed here; Is it because I'm using <!DOCTYPE html> that it's not working? Part of the error is saying with xmlns:ns1="http://www.w3.org/1998/Math/MathML" xmlns:ns2="http://www.w3.org/2000/svg"... do I need to specify another xmlns? Unfortunately the enshittification of google isn't helping me dig up any clues and I'm at a little bit of a loss. |
05-17-2023, 02:11 AM | #2 |
Wizard
Posts: 1,324
Karma: 6700864
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Best to post the <figure> code from Chapter2.html so we can get an idea how it is used.
Better would be to copy and paste the entire page, preferably to a paste site and provide the link. Last edited by Karellen; 05-17-2023 at 02:26 AM. |
05-17-2023, 02:28 AM | #3 |
Junior Member
Posts: 7
Karma: 10
Join Date: Sep 2022
Device: none
|
It looks like this:
Code:
<div style="text-indent:0;text-align:center;margin-right:auto;margin-left:auto;width:99%;page-break-before:auto;page-break-inside:avoid;page-break-after:auto;"> <div style="margin-left:0;margin-right:0;text-align:center;text-indent:0;width:100%;"> <p style="display:inline-block;text-indent:0;width:100%;"> <figure> <img alt="Some text" src="IMG_9963.jpg" style="width:99%;"/> <figcaption> <i class="calibre1">Some text</i> </figcaption> </figure> </p> </div> </div> Pretty much everywhere where I'm using a figure looks like this with only derivation of the text and file names. Last edited by RobertWK; 05-17-2023 at 02:31 AM. Reason: minor description of issues. |
05-17-2023, 03:10 AM | #4 |
Wizard
Posts: 1,324
Karma: 6700864
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
You have the <figure> elements nested inside <p> tags.
Remove the <p> tags and it should be fine. Some info... https://developer.mozilla.org/en-US/...Element/figure The coding doesn't seem to be the best. Heavy reliance on in-line attributes which would be better off in your css page. |
05-17-2023, 03:13 AM | #5 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Sep 2022
Device: none
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Error while parsing file 'element "img" not allowed here" | shotsfromthebar | Editor | 3 | 03-31-2017 03:53 AM |
epubcheck: attribute "page-map" not allowed here error message | Bala_85 | ePub | 2 | 07-14-2013 03:13 AM |
element "img" not allowed in this context | graniton | Calibre | 5 | 05-14-2012 11:39 PM |
ePub validation error: 'element "span" not allowed here' | nannygoats | ePub | 5 | 11-30-2011 08:47 AM |
epubcheck: attribute "page-map" not allowed here error message | Doitsu | ePub | 5 | 10-27-2011 08:51 PM |