Answers.Body: <p>Instead of using Adobe DE (which isn't always reliable), you should use the epubcheck validator online on your epub file. <a href="http://validator.idpf.org/" rel="nofollow">http://validator.idpf.org/</a></p>
  
  <p>You can download a copy of the validator tool on your own machine if you wish. </p>
  
  <p>That will give you more verbose and  actionable error messages. </p>
  
  <p>Here are some examples of error messages: <a href="https://github.com/IDPF/epubcheck/wiki/Errors" rel="nofollow">https://github.com/IDPF/epubcheck/wiki/Errors</a> (unfortunately this list doesn't seem to be complete or up to date). </p>
  
  <p>My guess based on a cursory reading of your file is that there are no file references here. Here's an example from one of my own files: </p>
  
  <pre><code>   &lt;navPoint id="d0e1652" playOrder="7"&gt;
              &lt;navLabel&gt;
                  &lt;text&gt;The Silver Link&lt;/text&gt;
              &lt;/navLabel&gt;
              &lt;content src="silver-link.xhtml"/&gt;
          &lt;/navPoint&gt;
          &lt;navPoint id="d0e2128" playOrder="8"&gt;
              &lt;navLabel&gt;
                  &lt;text&gt;Johnny Kinkaid&lt;/text&gt;
              &lt;/navLabel&gt;
              &lt;content src="johnny-kinkaid.xhtml"/&gt;
  </code></pre>
  
  <p>But your .ncx file has an empty reference;</p>
  
  <pre><code>      &lt;content src="" /&gt; 
  </code></pre>
  
  <p>As for your other questions, let me say that I have never had to worry about toc.ncx file problems before ... mainly because I auto-generate the file from Docbook. </p>
  
  <p>The meta stuff you have is exactly what I have; IIRC, it had to do with accessibility and spoken books. </p>
  
  <p>In my experience, kindlegen almost always produces a working file for kindle if you have given it a valid .epub file. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-04-28T04:47:11.410Z
Answers.Text: Thanks a lot! The validator is giving me these 2 errors: Mimetype entry missing or not the first in archive + Required META-INF/container.xml resource is missing even though both files *are* present. What I did was get a DRM-free book, and insert my own TOC.ncx in it, I've inserted an xhtml link (the same 'file.xhtml' for each src at the moment) too. My personal epub isn't completed yet, so I was using this one to check if my structure of the .ncx file was correct so I might not run into problems later after having created a really long ncx file. What do you think could be the problem ?
Answers.UserDisplayName: QPTR
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-04-28T05:32:31.640Z
Answers.Text: I found what was going wrong! I was creating the epub simply by zipping the folder, and changing .zip to .epub . Reading up, it seems like this is not the correct way. So downloaded and used a helpful utility known as ePUBPack that I found for zipping into epub. EpubValidator is still giving errors but the resultant epub is running on AdobeDE at least. Gonna go work on the errors now. Thanks for your help so much !
Answers.UserDisplayName: QPTR
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-04-29T03:02:26.053Z
Answers.Text: I know exactly about the stupid mimetype entry missing error. Apparently, how you do it in Windows is very bizarre. I asked about it 4 years ago and got this response: http://www.mobileread.com/forums/showthread.php?t=58913&highlight=rjnagle
Answers.UserDisplayName: idiotprogrammer
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-04-29T19:50:26.793Z
Answers.Text: I use 7-zip as my archive manager, and with that I can just use `zip -qXr ebook.epub mimetype *` to make a file called ebook.epub.
Answers.UserDisplayName: Tom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-04-28T02:21:27.150Z
Answers.LastActivityDate: 2014-04-28T02:27:18.817Z
Answers.LastEditDate: 2014-04-28T02:27:18.817Z
Answers.UserDisplayName: idiotprogrammer
Body: <p>I have created a <code>toc.ncx</code> file in EPUB3 for backwards compatibility with EPUB2 . I used that file in a DRM-free book (replacing the book's <code>toc.ncx</code> with my own) just to see if the code was okay, but when I try to open it in Adobe Digital Editions it opens up a dialog box with the following message : </p>
  
  <pre><code>Unable to open testing.epub
  Errors were encountered in this item
  </code></pre>
  
  <p>Is it not possible to test my ncx file this way? A partial code for my <code>.ncx</code> (just for a few headings) is below . I am creating a three-tiered list using nested navpoint tags in it. Preface is one big heading. Then there is the next big heading titled 'Heading' with Chapter 1 and 2 as its sub-headings. Chapter 2 then has its sub-sub headings with the nested navpoint tags.</p>
  
  <p>Could anyone please look at it and let me know if its okay?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd"&gt;
  &lt;ncx xmlns="http://www.daisy.org/z3986/2005/ncx/"  version="2005-1" xml:lang="en-US"&gt;
  &lt;head&gt;
  &lt;meta name="dtb:uid" content="uid"/&gt;
  &lt;meta name="dtb:depth" content="1"/&gt;
  &lt;meta name="dtb:totalPageCount" content="0"/&gt;
  &lt;meta name="dtb:maxPageNumber" content="0"/&gt;
  &lt;/head&gt;
  &lt;docTitle&gt;&lt;text&gt;Book Title&lt;/text&gt;&lt;/docTitle&gt;
  &lt;docAuthor&gt;&lt;text&gt;Anon, Anon&lt;/text&gt;&lt;/docAuthor&gt;
  
  
  &lt;navMap&gt;
  
          &lt;navInfo&gt;
              &lt;text&gt;THE CONTENTS&lt;/text&gt;
          &lt;/navInfo&gt;
  
          &lt;navPoint class="preface" id="preface-id" playOrder="1"&gt; 
           &lt;navLabel&gt;&lt;text&gt;Preface&lt;/text&gt;&lt;/navLabel&gt; 
           &lt;content src="" /&gt; 
          &lt;/navPoint&gt; 
  
          &lt;navPoint class="bk01" id="bk01-id" playOrder="2"&gt; 
           &lt;navLabel&gt;&lt;text&gt;Heading&lt;/text&gt;&lt;/navLabel&gt; 
           &lt;content src="" /&gt; 
                &lt;navPoint class="sect01" id="sect01-id" playOrder="3"&gt; 
                 &lt;navLabel&gt;&lt;text&gt;Chapter 1 (sub-heading of the above Heading)&lt;/text&gt;&lt;/navLabel&gt; 
                 &lt;content src="" /&gt; 
  
                &lt;/navPoint&gt; 
  
                &lt;navPoint class="sect02" id="sect02-id" playOrder="4"&gt; 
                 &lt;navLabel&gt;&lt;text&gt;Chapter 2 &lt;/text&gt;&lt;/navLabel&gt; 
                 &lt;content src="" /&gt; 
  
                     &lt;navPoint class="sect02DTL" id="sect02DTL-id" playOrder="5"&gt; 
                    &lt;navLabel&gt;&lt;text&gt;sub-heading (of chapter 2 above) &lt;/text&gt;&lt;/navLabel&gt; 
                   &lt;content src="" /&gt; 
  
                     &lt;navPoint class="sect02One" id="sect02One-id" playOrder="6"&gt; 
                    &lt;navLabel&gt;&lt;text&gt;sub-sub heading 1(is a direct link to the story text)&lt;/text&gt;&lt;/navLabel&gt; 
                   &lt;content src="" /&gt; 
                  &lt;/navPoint&gt; 
  
                  &lt;navPoint class="sect02Two" id="sect02Two-id" playOrder="7"&gt; 
                    &lt;navLabel&gt;&lt;text&gt;sub-sub heading 2&lt;/text&gt;&lt;/navLabel&gt; 
                   &lt;content src="" /&gt; 
                  &lt;/navPoint&gt;
  
                  &lt;/navPoint&gt; 
  
                &lt;/navPoint&gt; 
  
  
  
  
  
          &lt;/navPoint&gt; 
  
  
  
  &lt;/navMap&gt;
  
  &lt;/ncx&gt;
  </code></pre>
  
  <p>Also, there were a few things I wanted to ask about <code>.ncx</code> files in general that I couldn't find sufficiently explained on the internet.</p>
  
  <ol>
  <li><p>What's the main function of the meta tags in the <code>.ncx</code> file ? For example the meta tags with Total Page Count and max Page Number, do they serve any role ? Could one potentially do without any of them, what would be their importance.</p></li>
  <li><p>I noticed a tag named PageList with nested PageTarget and navList tags in the <code>toc.ncx</code> file of one of the EPUB books I was looking at for reference, do these work with Kindle ?</p></li>
  </ol>
  
Tags: <kindle><epub>
Title: Help creating a toc.ncx file for compatibility with epub 2
UserDisplayName: QPTR
ThreadText: # Help creating a toc.ncx file for compatibility with epub 2
  
  (Asked by: username_0 on 2014-04-27)
  
  I have created a toc.ncx file in EPUB3 for backwards compatibility with EPUB2 . I used that file in a DRM-free book (replacing the book's toc.ncx with my own) just to see if the code was okay, but when I try to open it in Adobe Digital Editions it opens up a dialog box with the following message : 
  Unable to open testing.epub
  Errors were encountered in this item
  
  Is it not possible to test my ncx file this way? A partial code for my .ncx (just for a few headings) is below . I am creating a three-tiered list using nested navpoint tags in it. Preface is one big heading. Then there is the next big heading titled 'Heading' with Chapter 1 and 2 as its sub-headings. Chapter 2 then has its sub-sub headings with the nested navpoint tags.
  Could anyone please look at it and let me know if its okay?
  
  
  
  
  
  
  
  
  
  Book Title
  Anon, Anon
  
  
  
  
          
              THE CONTENTS
          
  
           
           Preface 
            
           
  
           
           Heading 
            
                 
                 Chapter 1 (sub-heading of the above Heading) 
                  
  
                 
  
                 
                 Chapter 2  
                  
  
                      
                    sub-heading (of chapter 2 above)  
                    
  
                      
                    sub-sub heading 1(is a direct link to the story text) 
                    
                   
  
                   
                    sub-sub heading 2 
                    
                  
  
                   
  
                 
  
  
  
  
  
           
  
  
  
  
  
  
  
  Also, there were a few things I wanted to ask about .ncx files in general that I couldn't find sufficiently explained on the internet.
  
  What's the main function of the meta tags in the .ncx file ? For example the meta tags with Total Page Count and max Page Number, do they serve any role ? Could one potentially do without any of them, what would be their importance.
  I noticed a tag named PageList with nested PageTarget and navList tags in the toc.ncx file of one of the EPUB books I was looking at for reference, do these work with Kindle ?
  
  **Tags:** kindle, epub
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-04-28. Score: 4 | Accepted answer
  
  Instead of using Adobe DE (which isn't always reliable), you should use the epubcheck validator online on your epub file. http://validator.idpf.org/
  You can download a copy of the validator tool on your own machine if you wish. 
  That will give you more verbose and  actionable error messages. 
  Here are some examples of error messages: https://github.com/IDPF/epubcheck/wiki/Errors (unfortunately this list doesn't seem to be complete or up to date). 
  My guess based on a cursory reading of your file is that there are no file references here. Here's an example from one of my own files: 
     
              
                  The Silver Link
              
              
          
          
              
                  Johnny Kinkaid
              
              
  
  But your .ncx file has an empty reference;
         
  
  As for your other questions, let me say that I have never had to worry about toc.ncx file problems before ... mainly because I auto-generate the file from Docbook. 
  The meta stuff you have is exactly what I have; IIRC, it had to do with accessibility and spoken books. 
  In my experience, kindlegen almost always produces a working file for kindle if you have given it a valid .epub file.
  
  > **Comments:**
  > **username_0**: Thanks a lot! The validator is giving me these 2 errors: Mimetype entry missing or not the first in archive + Required META-INF/container.xml resource is missing even though both files *are* present. What I did was get a DRM-free book, and insert my own TOC.ncx in it, I've inserted an xhtml link (the same 'file.xhtml' for each src at the moment) too. My personal epub isn't completed yet, so I was using this one to check if my structure of the .ncx file was correct so I might not run into problems later after having created a really long ncx file. What do you think could be the problem ?  
  > **username_0**: I found what was going wrong! I was creating the epub simply by zipping the folder, and changing .zip to .epub . Reading up, it seems like this is not the correct way. So downloaded and used a helpful utility known as ePUBPack that I found for zipping into epub. EpubValidator is still giving errors but the resultant epub is running on AdobeDE at least. Gonna go work on the errors now. Thanks for your help so much !  
  > **username_1**: I know exactly about the stupid mimetype entry missing error. Apparently, how you do it in Windows is very bizarre. I asked about it 4 years ago and got this response: http://www.mobileread.com/forums/showthread.php?t=58913&highlight=rjnagle  
  > **username_2**: I use 7-zip as my archive manager, and with that I can just use `zip -qXr ebook.epub mimetype *` to make a file called ebook.epub.  
  
  ---
  
  