From MobileRead
Jump to: navigation, search

NCX is the short name for a Navigation Control file for XML applications. It is part of the specification for digital talking book DTB and is used in ePub documents to define the Table of Contents (TOC) and optionally a page list.


[edit] Overview

An NCX file is a required element for ePub 2 and Daisy DTB documents. While only the TOC portion of the NCX is required for ePub support the entire NCX file can be in the ePub document. The portions that are not supported will be ignored. This file is still supported but no longer required in ePub 3 which supports a different approach.

[edit] TOC

Here is an example of a toc.ncx file from ePub. It shows the use of a multi-level TOC.

<?xml version="1.0"?>
<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN"

<ncx xmlns="" version="2005-1">
       <meta name="dtb:uid" content="RT8513Z9UM0NLKLF8QX9QDJ3E6ZFL2"/>
       <meta name="dtb:depth" content="3"/>
       <meta name="dtb:totalPageCount" content="0"/>
       <meta name="dtb:maxPageNumber" content="0"/>
       <text>Document Title</text>
       <navPoint id="navPoint-1" playOrder="1">
               <text>Section with no subsection</text>
           <content src="text/content001.xhtml"/>
       <navPoint id="navPoint-2" playOrder="2">
               <text>TOC entry name Section title
           <content src="text/content001.xhtml#heading_id_3"/>
           <navPoint id="navPoint-3" playOrder="3">
                   <text>Section entry name.</text>
               <content src="text/content002.xhtml"/>
           <navPoint id="navPoint-4" playOrder="4">
               <content src="text/content003.xhtml"/>
               <navPoint id="navPoint-5" playOrder="5">
                       <text>Preserving the Text.</text>
                   <content src="text/content003.xhtml#heading_id_217"/>
               <navPoint id="navPoint-6" playOrder="6">
                       <text>Lower level chapter title</text>
                   <content src="text/content003.xhtml#heading_id_218"/>
               <navPoint id="navPoint-7" playOrder="7">
                       <text>Another lower level title.</text>
                   <content src="text/content003.xhtml#heading_id_219"/>

[edit] PageList

The PageList can provide 1 for 1 mapping to the actual page numbers in the physical book. Here is an example of the paglist section:

  <pageTarget type="normal" id="pagetarget000006" value="6" playOrder="6">
    <content src="part0000.html#page-6"/>
  <pageTarget type="normal" id="pagetarget000007" value="7" playOrder="7">
    <content src="part0000.html#page-7"/>

This mapping is used in DAISY eBooks. KindleGen can use this information to generate the page numbers in APNX files for use by the Kindle 3 Reader. Adobe Digital Editions does not support this page list but has a different method of doing the same thing. ePub 3#Page numbers defines the method used in version 3 of the ePub standard.

[edit] OPF

An OPF file is a required section for DTBook as it is for ePub

The NCX file can also have some of the same data at the OPF file for DTBook files. It can contain title, author, and other metadata. It can also point to all of the audio files that are used to present this data to a visually impaired person. The NCX serves as the main collection point for the audio files.

For DTBook (but not needed for ePub) a title similar to the entry shown above in the TOC section will be shown for the Document Title and Document Author could also be shown. The author entry can be repeated if there is more than one author.

<docTitle><text>The Book Title</text></docTitle>
<docAuthor><text>The Authors name</text></docAuthor>

A more complicated but more complete form would be:

    <text>Revised Standards and Guidelines of Service 
    for the Library of Congress Network of Libraries for the 
    Blind and Physically Handicapped 1995</text>
    <audio src="rs_title.mp3" clipBegin="00:00.00" clipEnd="00:09.04"/>
    <img src="rs_title.png" />
      <text>Association of Specialized and Cooperative 
      Library Agencies</text>
      <audio src="rs_title.mp3" clipBegin="00:09.50" clipEnd="00:14.70"/>

[edit] For more information

NCX specification as part of the DTB specification.

Personal tools

MobileRead Networks