View Single Post
Old 12-03-2014, 12:41 PM   #14
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,893
Karma: 6120478
Join Date: Nov 2009
Device: many
Hi,

The ncx is actually built on the fly recursively from the information either collected in the auto toc creation or via the editor.

So in order to make this work, we would have to modify the NCXWriter to remember all src hrefs and their associated playorder for each entry and if the exact same src href is ever used, instead of giving that entry a new playorder, I would have to give it the same playorder as was used for that src href previously. Otherwise incrementing the playorder. Since the playorder was also used to develop unique "id" attributes for each navpoint, that would have to change as well. Being a recursive routine this may end up being a bit tricky but should be doable.

But all that said ... I am still not fully convinced that it is a bug. It could all just be "user-error".

For example, to do what you want, if you simply add "id" attributes and use fragments even for the same location.

For example:

1. use file.xhtml for "preamble"
2. use file.xhtml#id1 for "chapter" where the body tag has "id1"
3. use file.xhtml#id2 for "section 1" where first p tag of the preamble has "id2"

Or almost anything along those lines as long as they are unique fragment ids.

Or alternatively, give the body tag two "id" attributes and use them for preamble, and section 1, and keep the file.xhtml without fragment for the chapter.

If you try this approach, everything should just work and the "issue" simply goes away, shouldn't it. Have you tried this?

KevinH

Last edited by KevinH; 12-03-2014 at 12:43 PM.
KevinH is offline   Reply With Quote