Skip to main content
Participating Frequently
August 31, 2024
Question

How to Fix NavMap and TOC Errors in EPUB Export

  • August 31, 2024
  • 1 reply
  • 3195 views

I'm trying to make a reflowable epub file for an ebook, and no matter what I do, when I check the epub file, I keep getting these two errors:

ERROR(RSC-005): /OEBPS/toc.ncx(16,11): Error while parsing file: element "navMap" incomplete; missing required element "navPoint"

ERROR(RSC-005): /OEBPS/toc.xhtml(9,9): Error while parsing file: element "ol" incomplete; missing required element "li"

 

It looks exactly how it's supposed to in my epub viewer, so I don't know why I'm getting these. Messing around with the file and searching for solutions online has just made me more frustrated, especially since I know I made an error-free epub last year for a different book - I just don't remember how I did it. I think the problem might be with the TOC, but I don't know what else I can try to get rid of these errors. Any suggestions? I don't have time to try starting over in a different program, since my publication deadline is coming up pretty soon. Could I just make a linked TOC manually instead of using the auto-TOC tool? I honestly wouldn't mind doing that.

 

<TItle renamed by MOD>

 

 

This topic has been closed for replies.

1 reply

James Gifford—NitroPress
Legend
August 31, 2024

First, what EPUB viewer are you using?

Second, what EPUB validator?

 

First', know that validator results are not nearly as important as they once were — when the approach was to hand-build EPUB files like some kind of programming project, there were many points at which mistakes could be made and validation was an essential tool to find these faults. In these days of exporting EPUB on a level with, say, PDF, checking for every technical jot and niddle is not necessarily useful, or necessary. Sometimes there are actual faults that might affect an end reader; other times the fault are akin to a beautiful new car that drives like a dream... but is 0.1 inch short of factory spec. The final "validation" is if the book reads, renders and navigates properly in a standard EPUB reader.

 

Second', Since those are ERRORs and not info/warnings, it's probably worth chasing them down.

 

So, Third —

  • Have you created a unique TOC 'style' for the dynamic (reader) table of contents? (That is, not "[default]"?)
  • Have you updated this TOC as a last step before export?
  • Do you specify this TOC 'style' in the export menu?
  • Are you using an in-text TOC as well as the reader/dynamic one?

 

Participating Frequently
August 31, 2024

1. The file is being checked by the publishing platform itself, Draft2Digital, so I cannot move forward with publication until their built-in checker says the file is okay. I'm not sure if they use their own original checker or have embedded some other one.

3. a. I have not made a TOC style. Not sure I've ever done that before and not sure how I'd do it, but I'll look into that.
b. I did the TOC last, but for some reason the "update" option was grayed out.
c. Since I don't have a TOC style, I have not specified anything in the export menu
d. The TOC appears in the text itself, with clickable links to take you to each chapter, like any other ebook, so not sure what you mean by in-text vs. reader/dynamic one.

James Gifford—NitroPress
Legend
August 31, 2024

I'm viewing it in Calibre


Okay, all very good. (All too often, these sometimes non-problems start with third-rate tools and platforms.)

 

I'd say all the problems come down to not properly defining the TOC. Try this:

  • Create a TOC that contains all the levels you want, properly sorted.
  • Set each level to "No Page Number" and "None" style where not grayed out.
  • Be sure to check Create PDF Bookmarks (this may be voodoo but won't hurt).
  • Be sure teo check Make Text Anchor in source.
  • SAVE the TOC under a unique name like EPUB or EBOOK.
    • Repeat the save ANY time you open the TOC panel and make any changes, or they will be lost — and before you click OK to generate the new TOC!
  • Click OK.
  • Use the loaded cursor to drag out a small text box, pretty anywhere. Then delete the box. (Another voodoo step; you can hit Esc but I have always felt completing the overall operation was more reliable even though no text box/content is wanted for an EPUB.)
    • Repeat the TOC update any time you make changes to the file — not just if you change headings, but because editing might have deleted or moved the text anchors.
  • At export time, be sure to select Navigation TOC: Multi Level, and specify your created TOC style name.

 

Despite the thinking that it's "like any other e-book," in-text TOCs are an anachronism and an eyesore besides being of little use when a dynamic TOC (which can be much deeper in levels) is just a tap away. I'd omit the visible TOC. If you insist on using it, you will need to create a second TOC style, define it all as you like, and save it under a unique name (VISIBLE or ONSCREEN, etc.). Be sure you completely replace any default/existing TOC and update this one, too, separately, as a last step before export. But really — just delete it. Screen TOCs are just clutter in e-books.

 

That should fix the errors, which are (almost certainly) coming from incomplete update and use of the default style. There is never a need, any more, to edit exported EPUBs. If you have errors, they're in the source or export and should not be patched up with antiquated methods afterwards.