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

nav doc expected to be an index #1122

Closed
mattgarrish opened this issue Mar 26, 2020 · 0 comments · Fixed by #1210
Closed

nav doc expected to be an index #1122

mattgarrish opened this issue Mar 26, 2020 · 0 comments · Fixed by #1210
Assignees
Labels
priority: medium To be processed and published in one of the upcoming releases spec: EPUB Indexes Impacting the support of the EPUB Indexes specification status: has PR The issue is being processed in a pull request type: false-positive This issue is about valid content being incorrectly rejected
Milestone

Comments

@mattgarrish
Copy link
Member

I was trying to update the "whole index" tests, but found the nav doc was integrated into the content. When I split it out per the minimal epub, I started getting this error:

nav.xhtml(2,110): Error while parsing file: At least one 'index' element must be present in a document declared as an index in the OPF.

I don't see why a nav doc (esp. not in the spine) would be expected to have an index, though. I can't find anything in the indexes spec that would corroborate this error, so I'm assuming it's epubcheck being overzealous.

For now, I'm just going to add the extra expected error and give preference to the common file structuring.

@rdeltour rdeltour self-assigned this Jun 30, 2020
@rdeltour rdeltour added priority: medium To be processed and published in one of the upcoming releases status: accepted Ready to be further processed type: false-positive This issue is about valid content being incorrectly rejected spec: EPUB Indexes Impacting the support of the EPUB Indexes specification labels Jun 30, 2020
@rdeltour rdeltour added this to the v4.2.5 milestone Feb 26, 2021
rdeltour added a commit that referenced this issue Feb 26, 2021
…dex Publication

This fix removes the index-specific schemas when checking the Navigation
Document.

It is probably too simple, a better implementation would only do so if
the Nav Doc is not in the spine or is not the only Content Document in
the spine, but there is no easy way to check that latter condition in
the NavChecker.
The fix is a reasonable compromise, as a false-negative (the Nav Doc
**must** have index content when it is the unique Content Document) should
be pretty rare, and is always better than a false-positive.

Fixes #1122
@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: accepted Ready to be further processed labels Feb 26, 2021
rdeltour added a commit that referenced this issue Feb 26, 2021
…dex Publication

This fix removes the index-specific schemas when checking the Navigation
Document.

It is probably too simple, a better implementation would only do so if
the Nav Doc is not in the spine or is not the only Content Document in
the spine, but there is no easy way to check that latter condition in
the NavChecker.
The fix is a reasonable compromise, as a false-negative (the Nav Doc
**must** have index content when it is the unique Content Document) should
be pretty rare, and is always better than a false-positive.

Fixes #1122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium To be processed and published in one of the upcoming releases spec: EPUB Indexes Impacting the support of the EPUB Indexes specification status: has PR The issue is being processed in a pull request type: false-positive This issue is about valid content being incorrectly rejected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants