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

EPUB 2 NCX navigation list parsing issues #55

Closed
vers-one opened this issue Sep 5, 2022 · 1 comment · Fixed by #56
Closed

EPUB 2 NCX navigation list parsing issues #55

vers-one opened this issue Sep 5, 2022 · 1 comment · Fixed by #56
Assignees
Labels

Comments

@vers-one
Copy link
Owner

vers-one commented Sep 5, 2022

Description

There are two issues with parsing EPUB 2 NCX navigation lists:

  1. Any NCX file with a navigation list causes NullReferenceException to be thrown.
  2. navTarget elements inside navigation lists are always ingored.

Here's a minimal NCX file to reproduce both of those issues:

<?xml version='1.0' encoding='utf-8'?>
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/">
  <head />
  <docTitle />
  <navMap />
  <navList id="navlist-1">
    <navLabel>
      <text>Test label</text>
    </navLabel>
    <navTarget id="navtarget-1">
      <navLabel>
        <text>Test label</text>
      </navLabel>
    </navTarget>
  </navList>
</ncx>

Sample EPUB file

test.epub

EPUB specification links

  1. https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.4.1
  2. https://daisy.org/activities/standards/daisy/daisy-3/z39-86-2005-r2012-specifications-for-the-digital-talking-book/#NCX
  3. http://www.daisy.org/z3986/2005/ncx-2005-1.dtd

Additional context

Those issues have not been caught earlier because navigation lists are very rare in EPUB books. (They are used for secondary tables of contents, e.g. a list of illustrations, a list of tables, etc.)

@vers-one
Copy link
Owner Author

vers-one commented Sep 5, 2022

Fixed in PR #56.

@vers-one vers-one closed this as completed Sep 5, 2022
@vers-one vers-one linked a pull request Sep 6, 2022 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant