
: Help creating a toc.ncx file for compatibility with epub 2 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
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?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1" xml:lang="en-US">
<head>
<meta name="dtb:uid" content="uid"/>
<meta name="dtb:depth" content="1"/>
<meta name="dtb:totalPageCount" content="0"/>
<meta name="dtb:maxPageNumber" content="0"/>
</head>
<docTitle><text>Book Title</text></docTitle>
<docAuthor><text>Anon, Anon</text></docAuthor>
<navMap>
<navInfo>
<text>THE CONTENTS</text>
</navInfo>
<navPoint class="preface" id="preface-id" playOrder="1">
<navLabel><text>Preface</text></navLabel>
<content src="" />
</navPoint>
<navPoint class="bk01" id="bk01-id" playOrder="2">
<navLabel><text>Heading</text></navLabel>
<content src="" />
<navPoint class="sect01" id="sect01-id" playOrder="3">
<navLabel><text>Chapter 1 (sub-heading of the above Heading)</text></navLabel>
<content src="" />
</navPoint>
<navPoint class="sect02" id="sect02-id" playOrder="4">
<navLabel><text>Chapter 2 </text></navLabel>
<content src="" />
<navPoint class="sect02DTL" id="sect02DTL-id" playOrder="5">
<navLabel><text>sub-heading (of chapter 2 above) </text></navLabel>
<content src="" />
<navPoint class="sect02One" id="sect02One-id" playOrder="6">
<navLabel><text>sub-sub heading 1(is a direct link to the story text)</text></navLabel>
<content src="" />
</navPoint>
<navPoint class="sect02Two" id="sect02Two-id" playOrder="7">
<navLabel><text>sub-sub heading 2</text></navLabel>
<content src="" />
</navPoint>
</navPoint>
</navPoint>
</navPoint>
</navMap>
</ncx>
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 ?
Free books android app tbrJar TBR JAR Read Free books online gutenberg
More posts by @Sarah

: Can I include code in .mobi to control the native voice synthesizer in a Kindle? Some kindle models come with a text to speech software that has several optional settings. There is both male

: What text format is least likely to clash with ebook formats? There are several different software products for collecting and formatting the electronic written word. Microsoft & Google, are
1 Comments
Sorted by latest first Latest Oldest Best
Instead of using Adobe DE (which isn't always reliable), you should use the epubcheck validator online on your epub file. 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: 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:
<navPoint id="d0e1652" playOrder="7">
<navLabel>
<text>The Silver Link</text>
</navLabel>
<content src="silver-link.xhtml"/>
</navPoint>
<navPoint id="d0e2128" playOrder="8">
<navLabel>
<text>Johnny Kinkaid</text>
</navLabel>
<content src="johnny-kinkaid.xhtml"/>
But your .ncx file has an empty reference;
<content src="" />
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.
Free books android app tbrJar TBR JAR Read Free books online gutenberg