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 ?