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

epubcheck standard output error if role=doc-epigraph #1141

Closed
LaZay opened this issue May 12, 2020 · 12 comments
Closed

epubcheck standard output error if role=doc-epigraph #1141

LaZay opened this issue May 12, 2020 · 12 comments
Assignees
Labels
spec: EPUB 3.x Impacting the support of EPUB 3.x specifications status: has PR The issue is being processed in a pull request type: spec The issue is related to a Specification update
Milestone

Comments

@LaZay
Copy link

LaZay commented May 12, 2020

Hello,
We have an epub containing role=doc-epigraph.
Example : <section epub:type="epigraph" role="doc-epigraph">
This doc-epigraph value has been defined in:

Usually, both epub:type + role attributes can be used together on an element. As we now do for every other semantic values.

In epubcheck 4.2.2 (same as in 4.0.2), the XML report indicates Well-formed, which is fine.
Example of batch run with XML report : java -jar %EPUBCKECK422% %EAN%.epub -out %EAN%.epubcheck422.xml

But epubcheck error output is reporting an error (java.lang.StackOverflowError refering to DuplicateAttributeDetector), which is a problem.

Example of batch run with error output : java -jar %EPUBCKECK422% %EAN%.epub 2> %EAN%.epubcheck422.log

Could you fix this please?
Thnks

@dauwhe
Copy link
Contributor

dauwhe commented May 12, 2020

This seems to be a duplicate of #1019. See the discussion there; it's still an open issue.

@dauwhe
Copy link
Contributor

dauwhe commented May 12, 2020

And note that <div epub:type="epigraph" role="doc-epigraph"> is valid.

@LaZay
Copy link
Author

LaZay commented May 12, 2020

Sure... But we need to stick to section for two reasons. One functional, one technical:

  • In the litterature, very often, you have book/chapter opening page, containing only an epigraph. This opening page is never referenced by the TOC though.
  • Our ePub subcontractors have industrialized their HTML tagging process. Every individual HTML page starts with body / section tags now. We would like to avoid a div exception in this case.

@atroia
Copy link

atroia commented May 12, 2020

* In the litterature, very often, you have book/chapter opening page, containing only an epigraph. This opening page is never referenced by the TOC though.

I dont think I got into an explanation of my usage of this in my post, but this was how I was trying to use the role as well.

@dauwhe
Copy link
Contributor

dauwhe commented May 13, 2020

When I made a quick sample to check this, with <section epub:type="epigraph" role="doc-epigraph"> I got a useful error message:

/Users/cramerd/w3c/publ-cg/tests/misc/italic-hack
  adding: mimetype 	(in=20) (out=20) (stored 0%)
total bytes=20, compressed=20 -> 0% savings
excluding mimetype
  adding: META-INF/	(in=0) (out=0) (stored 0%)
  adding: META-INF/container.xml	(in=259) (out=172) (deflated 34%)
  adding: OPS/	(in=0) (out=0) (stored 0%)
  adding: OPS/nav.xhtml	(in=365) (out=232) (deflated 36%)
  adding: OPS/content_001.xhtml	(in=310) (out=189) (deflated 39%)
  adding: OPS/package.opf	(in=675) (out=355) (deflated 47%)
total bytes=1629, compressed=968 -> 41% savings
Validating using EPUB version 3.2 rules.
ERROR(RSC-005): ..epub/OPS/content_001.xhtml(7,51): Error while parsing file: value of 
attribute "role" is invalid; must be equal to "alert", "alertdialog", "application", "banner", 
"complementary", "dialog", "doc-abstract", "doc-acknowledgments", "doc-afterword", 
"doc-appendix", "doc-bibliography", "doc-chapter", "doc-colophon", "doc-conclusion", 
"doc-credit", "doc-credits", "doc-dedication", "doc-endnotes", "doc-epilogue", "doc-errata", 
"doc-example", "doc-foreword", "doc-glossary", "doc-index", "doc-introduction", "doc-notice", 
"doc-pagelist", "doc-part", "doc-preface", "doc-prologue", "doc-pullquote", "doc-qna", 
"doc-toc", "document", "feed", "log", "main", "marquee", "navigation", "region", "search", 
"status" or "tabpanel"

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

@dauwhe
Copy link
Contributor

dauwhe commented May 13, 2020

Feel free to edit the previous post—it might save us some scrolling :)

@LaZay
Copy link
Author

LaZay commented May 13, 2020

I just did... ;-)

@CircularKen
Copy link

Just chipping in and following this thread.

This has also just been thrown up as an epubcheck error in my testing of CircularFLO reflowable output. For now I will adapt to not apply any role to epigraph sections.

It does seem odd that preface, introduction, forward etc. are all allowed as roles for sections but epigraph is not.

@TzviyaSiegman
Copy link
Collaborator

@CircularKen would you please clarify which error you're getting. This is a long thread :).Thanks

@mattgarrish
Copy link
Member

We ultimately resolved this in Ace to allow doc-epigraph on section and a patch was submitted to the HTML in ARIA spec which is also now up-to-date.

The only remaining issue is that the HTML validator hasn't been updated to reflect the change, so even with the updated schemas this isn't going to be fixed in the next release unless we do a manual override.

@CircularKen
Copy link

@TzviyaSiegman - Yes, the same ERROR message as Dave Cramer reported (RSC-005) when running EPUBCheck 4.2.2 via Pagina EPUB-Checker 2.0.0

@rdeltour rdeltour self-assigned this Jun 22, 2020
@rdeltour rdeltour added spec: EPUB 3.x Impacting the support of EPUB 3.x specifications status: has PR The issue is being processed in a pull request type: spec The issue is related to a Specification update labels Jun 22, 2020
@rdeltour rdeltour added this to the 4.2.3 milestone Jun 22, 2020
@rdeltour
Copy link
Member

Fixed by #1142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec: EPUB 3.x Impacting the support of EPUB 3.x specifications status: has PR The issue is being processed in a pull request type: spec The issue is related to a Specification update
Projects
None yet
Development

No branches or pull requests

7 participants