View Single Post
Old 11-25-2014, 05:05 PM   #1
Peter Ahlstrom
Connoisseur
Peter Ahlstrom ought to be getting tired of karma fortunes by now.Peter Ahlstrom ought to be getting tired of karma fortunes by now.Peter Ahlstrom ought to be getting tired of karma fortunes by now.Peter Ahlstrom ought to be getting tired of karma fortunes by now.Peter Ahlstrom ought to be getting tired of karma fortunes by now.Peter Ahlstrom ought to be getting tired of karma fortunes by now.Peter Ahlstrom ought to be getting tired of karma fortunes by now.Peter Ahlstrom ought to be getting tired of karma fortunes by now.Peter Ahlstrom ought to be getting tired of karma fortunes by now.Peter Ahlstrom ought to be getting tired of karma fortunes by now.Peter Ahlstrom ought to be getting tired of karma fortunes by now.
 
Posts: 80
Karma: 500000
Join Date: Oct 2011
Location: Utah
Device: iPad
toc.ncx error with playOrder causes validation failure

Hey there, here's an error I haven't seen before.

I used Sigil to make the Table of Contents for a book, and the resulting file passed Sigil's validator but failed when uploading to both Apple and Kobo. The IDPF validator throws errors like this:

ERROR OEBPS/toc.ncx 152 49 assertion failed: different playOrder values for navPoint/navTarget/pageTarget that refer to same target

In the toc.ncx, the offending section looks like this:

Code:
      <navPoint id="navPoint-24" playOrder="24">
        <navLabel>
          <text>Sections from the first draft of Pandemonium</text>
        </navLabel>
        <content src="Text/AP_lauren_oliver_story.xhtml"/>
        <navPoint id="navPoint-25" playOrder="25">
          <navLabel>
            <text>1.</text>
          </navLabel>
          <content src="Text/AP_lauren_oliver_story.xhtml"/>
        </navPoint>
Manually changing the second playOrder="25" to playOrder="24" and manually renumbering all the playOrders after that causes this validation error to go away.

So when Sigil is writing the toc.ncx, if the content src for a navpoint is the same as the previous navpoint, it should give them the same playOrder (even though the navpoints will then have different numbers from their playOrders).

(You might say, "Well, don't have multiple TOC entries that point to the same location!" but there occasionally are good reasons for doing that, and it's structurally valid.)

Last edited by Peter Ahlstrom; 11-25-2014 at 05:12 PM.
Peter Ahlstrom is offline   Reply With Quote