nlbdev / nordic-epub3-dtbook-migrator

Tools for converting between a strict subset of DTBook and EPUB3.
http://nlbdev.github.io/nordic-epub3-dtbook-migrator/
GNU Lesser General Public License v2.1
8 stars 7 forks source link

Navtoc heading--content doc heading matching of title page heading with title spans? #446

Closed martinpub closed 3 years ago

martinpub commented 3 years ago

There is a rule that the link name in the nav.xhtml toc should match that of the heading element for the linked section, which is a good check.

However, consider the following heading, from the title page:

<h1 epub:type="fulltitle" class="title" id="h1_1"><span epub:type="title">Försvarets förfall</span> <span epub:type="subtitle" role="doc-subtitle">Konsten att lägga ned försvaret utan att någon bryr sig</span></h1>

In this instance, could we add an exception that only matching the h1/span[@epub:type="title"]/text() instead of the full heading? I guess we don't want to have the spans in nav.xhtml, and using "Försvarets förfall Konsten att lägga ned försvaret utan att någon bryr sig" for the link text is not ideal I would say.

Any other suggestions? Ping @AndersEkl @kalaspuffar @josteinaj