View Single Post
Old 03-18-2011, 08:12 PM   #2
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Hi PH

Quote:
Originally Posted by pavelh View Post
<navPoint id="XXX" playOrder="1">
<navLabel><text>YYY</text></navLabel>
<content src="book.html#2HCH0001"/>
</navPoint>


Can I leave the fields XXX and YYY the same for all navpoints? I don't think I have any use for naming them.
The id ("XXX") needs to be unique for each navPoint. However if this is just for your own use, and on the Kindle, you could get away with using the same text ("YYY") for each navLabel. If, though, a future update of the Kindle firmware resulted in it using the NCX file content to generate a TOC (unlikely, I know, given how many Kindle ebooks don't have NCX info coded into them ), you'd have to rework all of your ebooks. Similarly if you ever wanted to convert these MOBI files to EPUB files (e.g. if you got a different ereader), since EPUB readers generally rely on the NCX file to generate a TOC to display to the user. If you use the same text for all of the navLabels, you'd end up with a TOC that had the same text repeated over and over.

Quote:
Originally Posted by pavelh View Post
I add one <item> to the beginning [of the manifest] like this:
<manifest>
<item id="ncx" media-type="application/x-dtbncx+xml" href="toc.ncx">
</item>
...etc...
That looks fine.

Quote:
Originally Posted by pavelh View Post
Then I change <spine> from this:
<spine>
<itemref idref="toc"/>
<itemref idref="item1"/>
</spine>


To this (exactly like this, does not begin with <spine> anymore):
<spine toc="ncx">
<itemref idref="toc"/>
<itemref idref="item1"/>
</spine>
That's fine too. Just a very minor, technical note - it actually does still start with a <spine> tag, just one that has a toc attribute added, which references the id value given to the NCX file in the manifest (highlighted in red).

Apart from the issue highlighted above, I can't see any other potential problems with the process you're using, PH.
DMSmillie is offline   Reply With Quote