Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated epubs fail epubcheck #35

Open
stewart123579 opened this issue Aug 11, 2022 · 1 comment
Open

Generated epubs fail epubcheck #35

stewart123579 opened this issue Aug 11, 2022 · 1 comment

Comments

@stewart123579
Copy link

Generated epubs fail epubcheck

Downloading the sample epub results in

Validating using EPUB version 2.0.1 rules.
ERROR(RSC-005): sample.epub/content.opf(46,10): Error while parsing file: element "guide" incomplete; missing required element "reference"

Check finished with errors
Messages: 0 fatals / 1 error / 0 warnings / 0 infos 

When I generate the sample epub from sample.org I get more errors:

Validating using EPUB version 2.0.1 rules.
ERROR(PKG-007): sample.epub/mimetype(-1,-1): Mimetype file should only contain the string "application/epub+zip" and should not be compressed.
ERROR(RSC-005): sample.epub/content.opf(46,10): Error while parsing file: element "guide" incomplete; missing required element "reference"
ERROR(RSC-005): sample.epub/body.html(15,44): Error while parsing file: attribute "role" not allowed here; expected attribute "class", "dir", "lang", "style", "title" or "xml:lang"
ERROR(RSC-005): sample.epub/body.html(17,49): Error while parsing file: attribute "role" not allowed here; expected attribute "class", "dir", "lang", "style", "title" or "xml:lang"

Check finished with errors
Messages: 0 fatals / 4 errors / 0 warnings / 0 infos

org version: 9.5.4
emacs version: GNU Emacs 28.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95)) of 2022-05-12
platform: Mac 12.4
installed via: MELPA ox-epub-20181101.1854

@stewart123579
Copy link
Author

PR #36 addresses the mimetype error, however the role errors look to sit somewhere in either ox-html or in how epubcheck handles role attributes in <div> tags.

The problem is in the generated body.html at this point:

<div id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">

I don't understand the HTML and EPUB specs well enough to judge where this issue falls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant