Question about the NCX

4 posts / 0 new
Last post


I have a question about the NCX. I know that it's a deprecated element in EPUB 3, but it's still necessary to handle it for backward compatibility purposes.

You know certainly that NCX comes from the Daisy specification, which specification is available at this address :

The EPUB specification concerning the NCX is available here :

We can consider, after reading the two links given above, that the EPUB specification preconises to use a profile of the original specification concerning the NCX file. Actually, some attributes described in the original NCX specification are not used in the context of EPUB (img, audio, smil elements, etc.).

I have a question about one of those differences.

The DAISY specification precises that there could be multiple <navLabel> in a <navPoint> element. But, in my short life of EPUB developer, I've never seen an EPUB with multiple <navLabel> inside a <navPoint>. Most of the EPUB 2 files I checked has only one <navLabel> inside <navPoint>.

My questions are :
1°) Is it possible to find multiple <navLabel> in <navPoint> in a EPUB ncx ?
2°) If the answer to the first question is yes, what a reading system should do when it faces this situation (multiple <navLabel> in a <navPoint>) ? Considere only the first navLabel ? Concatenate the navLabel texts ? Or something else ?

Sorry for the technical and boring character of this question :(.

Thank you.

Here's a reference from the navelLabel definition in the DAISY spec that might help:

When applied to <navPoint>s, it generally contains the heading of the referenced section of the document. Can be repeated so labels can be provided in multiple languages.

It's rare in DAISY, too, to find multilingual publications, so multiple labels are indeed not common. But in terms of covering all possibilities, barring an xml:lang that would allow matching the language to a user preference, I would say use the first label and ignore any others.

Just to flesh out my answer, since the navigation document doesn't provide equivalent functionality, it's another reason why you're unlikely to encounter more than one navLabel in a back-translated NCX.

The toc nav in the navigation document reflects the heading structure and labels in the book, not translations of those headings.

For truly multilingual publications, the inclusion of multiple renditions in the container would handle navigation in different languages.

Thank you Matt. It's more clear like that.

Secondary menu