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
(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")
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.
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.
Copy link to clipboard
Copied
Love it! Thanks James.
1 it is then.
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. 🙂
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!
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.
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.
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.
Copy link to clipboard
Copied
I'm just going with what ID offers, which is reflowable or fixed. Not spotted any number variants
Copy link to clipboard
Copied
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. 🙂
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!
Copy link to clipboard
Copied
Wonderful. That's an easy fix and makes a better ebook to boot!