View Full Version : Can a toc.ncx point to an empty content tag?


twedigteam
02-01-2013, 04:34 PM
To simplify:

Curious if anyone knows a way to get a TOC to have a top-level header point to an empty link? I've tried using <content src="" /> and <content src="#" /> but neither seem to not want to validate via EPUBCheck. I'm trying to make a nested list in the nav TOC, but there is no actual page for the header.

Example:
List Title [empty, no link]
List Item 1 [links to page]
List Item 2 [links to page]
List Item 3 [links to page]

Or is it just possible that it is a requirement of the toc.ncx to have the <content> pointing somewhere in the manifest?

THANKS!!!

Doitsu
02-02-2013, 12:56 AM
IMHO, there's no point in having TOC entries that go nowhere. If you still want to keep them, why don't you use the id of the item immediately following the title?

twedigteam
02-04-2013, 01:24 PM
IMHO, there's no point in having TOC entries that go nowhere. If you still want to keep them, why don't you use the id of the item immediately following the title?

I agree completely, which is why I've never run into this before. The TOC entries I have nested are not in logical order in the book, therefore there isn't any type of top-level heading/title for the list. On thinking about it more, I'll take your advice! Cheers and thanks.

Jellby
02-05-2013, 04:43 AM
Maybe what you need is not a TOC entry, but a <navList> element. Unfortunately, I know of no reading system that supports <navList>

Toxaris
02-05-2013, 06:28 AM
What if you just leave out the <content>?

twedigteam
02-05-2013, 01:22 PM
What if you just leave out the <content>?

Hmm, good suggestion, thought that might work but it produces: 'element "navPoint" not allowed yet; missing required element "content"' as an error.

Oh well, I suppose these types of issues will probably be rendered moot on moving to EPUB3 and the nav document.

JSWolf
02-05-2013, 08:08 PM
Hmm, good suggestion, thought that might work but it produces: 'element "navPoint" not allowed yet; missing required element "content"' as an error.

Oh well, I suppose these types of issues will probably be rendered moot on moving to EPUB3 and the nav document.

I've figured out the solution. For the entry that you want as a header for the top level, put in the same file to go to as the first entry in the next level. That way if anyone does use it to go to a ToC entry, it will go to the first one in level 2. So using your example...

Example:
List Title [links to same page as item 1]
List Item 1 [links to page]
List Item 2 [links to page]
List Item 3 [links to page]

twedigteam
02-08-2013, 11:57 AM
Cheers, thanks for all the help on this one. That seems to be about as close as we can get to a solution. Interested to see what EPUB3 does for the <nav> document.