• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

InDesign epub exports failing epub check

Community Beginner ,
Nov 06, 2024 Nov 06, 2024

Copy link to clipboard

Copied

Why are these errors and how do I find the place to amend them (all RSC-005)? I've used ID Styles for both text and objects and am not a coder.

For content.opf error reads:

(line 2, col 105):
Error while parsing file: attribute "xml:lang" not allowed here; expected attribute "id"

 

Line 2 = <package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="bookid" xml:lang="en-GB">

 

In the cover.xhtml lines 3–11 read

<head>
<title>Cover</title>
</head>
<body>
<figure style="text-align:center;">
<img src="image/1.png" alt="Cover of It&apos;s The Truth: Making The Only Ones by Simon Wright" style="max-width:100%;" role="doc-cover" />
</figure>
</body>
</html>
 
And the errors are defined as
1) (line 8, col 38)
Error while parsing file: element "figure" not allowed anywhere; expected 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")
2) (line 9, col 143):
Error while parsing file: attribute "role" not allowed here; expected attribute "class", "dir", "height", "id", "ismap", "lang", "longdesc", "title", "usemap", "width" or "xml:lang"
3) (line 11, col 9):
Error while parsing file: element "body" incomplete; expected 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")
 
While in the text.xhtml the file, lines 9–13 read:
<div class="_idGenObjectLayout-1">
<figure id="_idContainer000" class="_idGenObjectStyleOverride-1">
<img class="_idGenObjectAttribute-1" src="image/Only_Ones_2nd_edition_cover.png" alt="" />
</figure>
</div>
 
And the 2 errors are:

 (line 10, col 69):
Error while parsing file: element "figure" not allowed anywhere; expected the element end-tag, text or element "a", "abbr", "acronym", "address", "applet", "b", "bdo", "big", "blockquote", "br", "cite", "code", "del", "dfn", "div", "dl", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "ol", "p", "pre", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "table", "tt", "ul" or "var" (with xmlns:ns="http://www.w3.org/2000/svg")

 

(line 11, col 95):
Error while parsing file: element "figure" not allowed anywhere; expected the element end-tag, text or element "a", "abbr", "acronym", "address", "applet", "b", "bdo", "big", "blockquote", "br", "cite", "code", "del", "dfn", "div", "dl", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "ol", "p", "pre", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "table", "tt", "ul" or "var" (with xmlns:ns="http://www.w3.org/2000/svg")

TOPICS
EPUB , Import and export

Views

379

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Nov 07, 2024 Nov 07, 2024

The issue is that you are exporting EPUB 2. If you switch to exporting EPUB 3, these validation errors will disappear. 

 

Are you consciously choosing EPUB 2? If yes, may I ask why? There is no reason at all to stick to this older format. 

Votes

Translate

Translate
Community Expert ,
Nov 06, 2024 Nov 06, 2024

Copy link to clipboard

Copied

Oh, fer frak's sake — I didn't see that coming. I did write a technical note here in the forum about the change, but in haste, ignorance or blind trust I asumed it was compliant with the implemented standards. We once again have InDesign jumping ahead on export changes and "compliance" that is not in step with the downstream EPUB world.

 

The short take is that images are now exported in a <figure> element, not a <div>. I have no idea who said what to whom or when about this change being 'compliant' or necessary; all I know is that the 2025 rush to accessiblity (for the EU, mainly) is creating something a lot like <chaos> in the EPUB world.

 

The only solutions are (1) ignore the errors and assume that any downstream sales portal or reader understands what to do with a <figure> even if EPUBcheck is clueless so far; (2) manually edit all <figure> elements to <div> (which may not work) or just wait until the reality end of EPUB catches up with the navel-gazing end of it.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 07, 2024 Nov 07, 2024

Copy link to clipboard

Copied

Love it! Thanks James.

1 it is then.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2024 Nov 07, 2024

Copy link to clipboard

Copied

I'll just add that part of the reason this went past me is that no EPUB reader so far  — including Thorium, Calbre and Kindle Previewer — so much as seems to notice the change. I long ago gave up trying to follow the talmudic twists of the EPUB standard but I assume these tools implemented this detail correctly, and as awkwardly as it does, InDesign is slowly moving towards greater standards compliance. Why EPUBcheck would choke on it is... just evidence of the field's fragmentation.

 

I just wouldn't worry about it unless an actual distribution portal like KDP, Ingram, Apple etc. rejects it. I think it's a bit more of consequence to CSS stylists who may go bonkers trying to figure out why existing projects now spurn any image adjustments. 🙂


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 07, 2024 Nov 07, 2024

Copy link to clipboard

Copied

So this is what IngramSpark rejected the epub for! I've put in a query quoting you - we'll see. Might have to do option 2!Content  validation.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2024 Nov 07, 2024

Copy link to clipboard

Copied

AFAIK, most of these portals use EPUBcheck as their core validation engine. It baffles me how this degree of variance from a well-defined (if antiquated and cluttered) standard can keep recurring.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 07, 2024 Nov 07, 2024

Copy link to clipboard

Copied

Wrapping images in a more semantic <figure> tag is the correct way to format them. The issue here is not the <figure> tag but that he is using EPUB 2, not EPUB 3. 

And, for the record, I am involved in pushing the changes to how InDesign exports EPUB. These changes all make for better EPUB all around, including better accessibility. There is not veering away from standards happening at all but rather the opposite: adhering more closely to standards. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 07, 2024 Nov 07, 2024

Copy link to clipboard

Copied

The issue is that you are exporting EPUB 2. If you switch to exporting EPUB 3, these validation errors will disappear. 

 

Are you consciously choosing EPUB 2? If yes, may I ask why? There is no reason at all to stick to this older format. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 07, 2024 Nov 07, 2024

Copy link to clipboard

Copied

I'm just going with what ID offers, which is reflowable or fixed. Not spotted any number variants 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 07, 2024 Nov 07, 2024

Copy link to clipboard

Copied

There is a place at the start of the EPUB export wizard in ID where you can choose EPUB 2 or 3. It is now set to export EPUB 3 by default, but EPUB 2.0.1 is an option in the drop-down menu. See the attached screenshot. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2024 Nov 07, 2024

Copy link to clipboard

Copied

As LB said, the reflowable export menu gives you a choice of v2.01 or v3; IMHO, the v2 option should just be removed but at least they finally made v3 the default option. (It's the only option for fixed-page, but then, FXL shouldn't be used at all for most projects in InDesign.)

 

It's possible you were misled by the titantic amount of outdated and simply wrong information the web contains on EPUB. That which isn't outdated because it was written and posted ten years ago is that because someone with outdated notions reprinted or copied it. And, of course, this old information is what comes up high in the search returns, masking all newer and more accurate material. (Then again, the collective expertise over in the three-letter portal insist, to this day and the point of tribal warfare, that EPUB 2 is "better," EPUB 3 is completely obsolete, and that their service "doesn't even accept EPUB 3 files any more." So it's kind of a sisyphean task.) The bottom line is that I don't recommend anyone use any web resource  found via search for EPUB information, whether it's a blog or YT video or what, simply because you have to have a high level of expertise to determine if the information is in any way current, valid, useful or even basically right.

 

But now you know to use EPUB 3, at least. 🙂


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 08, 2024 Nov 08, 2024

Copy link to clipboard

Copied

There you go - thank you. EPUB3 it is from now on - I was mislead by 2 being the default and some vague memory of advice to avoid 3!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 08, 2024 Nov 08, 2024

Copy link to clipboard

Copied

LATEST

Wonderful. That's an easy fix and makes a better ebook to boot!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines