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

NcxResource does not account for namespaces #10

Open
adduc opened this issue Jul 30, 2017 · 0 comments
Open

NcxResource does not account for namespaces #10

adduc opened this issue Jul 30, 2017 · 0 comments

Comments

@adduc
Copy link

adduc commented Jul 30, 2017

Chapters are not processed when loading an ebook with an ncx file that uses a non-default namespace for ncx attributes/elements, and an Invalid argument supplied for foreach() warning is emitted.

Example bad toc.ncx:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<ncx:ncx xmlns:ncx="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
  <ncx:head>
    <ncx:meta name="cover" content="cover"/>
    <ncx:meta name="dtb:depth" content="-1"/>
    <ncx:meta name="dtb:totalPageCount" content="0"/>
    <ncx:meta name="dtb:maxPageNumber" content="0"/>
  </ncx:head>
  <ncx:docTitle>
    <ncx:text>Sample EBook</ncx:text>
  </ncx:docTitle>
  <ncx:navMap>
    <ncx:navPoint id="id286448480" playOrder="1">
      <ncx:navLabel>
        <ncx:text>Sample EBook</ncx:text>
      </ncx:navLabel>
      <ncx:content src="index.html"/>
      <ncx:navPoint playOrder="2" id="toc">
        <ncx:navLabel>
          <ncx:text>Table of Contents</ncx:text>
        </ncx:navLabel>
        <ncx:content src="toc.html"/>
      </ncx:navPoint>
      <ncx:navPoint id="id286448498" playOrder="3">
        <ncx:navLabel>
          <ncx:text>Sample EBook</ncx:text>
        </ncx:navLabel>
        <ncx:content src="pr01.html"/>
      </ncx:navPoint>
    </ncx:navPoint>
  </ncx:navMap>
</ncx:ncx>
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