View Single Post
Old 05-23-2011, 08:43 PM   #3
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
That was my first thought too, though then when I looked at a nested TOC structure I got scared

For instance say I have this (from an actual book):
Code:
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
    <head>
        <meta name="dtb:uid" content="4784ca89-f128-4a73-92ed-b84ac4edb658"/>
        <meta name="dtb:depth" content="2"/>
        <meta name="dtb:totalPageCount" content="0"/>
        <meta name="dtb:maxPageNumber" content="0"/>
    </head>
    <docTitle>
        <text>Grave Surprise</text>
    </docTitle>
    <navMap>
        <navPoint id="navPoint-1" playOrder="1">
            <navLabel>
                <text>Grave Surprise</text>
            </navLabel>
            <content src="Text/jacket1.xhtml"/>
            <navPoint id="navPoint-2" playOrder="2">
                <navLabel>
                    <text>Book Jacket</text>
                </navLabel>
                <content src="Text/jacket1.xhtml#heading_id_3"/>
            </navPoint>
        </navPoint>
        <navPoint id="navPoint-3" playOrder="3">
            <navLabel>
                <text>Grave Surprise</text>
            </navLabel>
            <content src="Text/jacket_split_000.xhtml"/>
            <navPoint id="navPoint-4" playOrder="4">
                <navLabel>
                    <text>Book Jacket</text>
                </navLabel>
                <content src="Text/jacket_split_001.xhtml"/>
            </navPoint>
        </navPoint>
    </navMap>
</ncx>
If this was a flat ncx, then I would have thought it would be easy, in that I could just remove the whole navPoint which contains the content node.

However how should I "fiddle" the structure, if it is not the innermost navPoint that I am removing?
kiwidude is offline   Reply With Quote