I am trying to figure out an appropriate toc.ncx that EpubCheck will recognize as correct.

Right now I have:

<?xml version="1.0" encoding="utf-8"?>
<ncx version="2005-1" xmlns="http://www.daisy.org/z3986/2005/ncx/">
        <meta content="urn:uuid:e9f75adf-f0a2-4a30-b113-b146871f16e5" name="dtb:uid"/>
        <meta content="0" name="dtb:totalPageCount"/>
        <meta content="0" name="dtb:maxPageNumber"/>
        <meta content="2" name="dtb:depth"/>
        <text>C.J.S. Hayward</text>
        <navPoint class="h1" id="letters.xhtml" playOrder="1"><navLabel><text>The Angelic Letters</text></navLabel><content src="letters.xhtml" /></navPoint>
<navPoint class="h1" id="spectacles.xhtml" playOrder="2"><navLabel><text>The Spectacles</text></navLabel><content src="spectacles.xhtml" /></navPoint>
<navPoint class="h1" id="doxology.xhtml" playOrder="3"><navLabel><text>Doxology</text></navLabel><content src="doxology.xhtml" /></navPoint>


What should I be doing differently in this file? The error I'm getting is:

Fatal Error while parsing file 'The prefix "ns" for element "ns:ncx" is not bound.'.

  • 1
    FUN FACT: toc.ncx is no longer a mandatory file in epub3 (it was only required in epub 2). In epub3 it is no longer necessary to have a toc.ncx file (and for future versions it will be deprecated). Instead you include a HTML navigation document (which you mark by using the NAV element in that file). I've never tried deleting this file when I generate it, but I'm guessing that doing so would eliminate the error. Nov 22 '17 at 6:11
  • @idiotprogrammer I would still recommend a ncx file for compatibility with the majority of reading systems.
    – geek1011
    Nov 27 '17 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.