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

Validator issue: [nordic_nav_references_2b] The nesting of headlines in the content does not match the nesting of headlines in the navigation document #444

Closed martinpub closed 3 years ago

martinpub commented 3 years ago

Validator result for DTB37628:

[nordic_nav_references_2b] The nesting of headlines in the content does not match the nesting of headlines in the navigation document. The toc item (<a href="DTB37628-001-cover.xhtml#prodnote_2">) in the navigation document is not nested at the correct level. The referenced document (DTB37628-001-cover.xhtml) occurs in the navigation document at nesting depth 1 (it is not contained inside other sections such as a part or a chapter). The referenced headline (DTB37628-001-cover.xhtml#prodnote_2) occurs in the navigation document at nesting depth 2 (it is contained inside "Cover"). The referenced headline (<></>) occurs in the content document DTB37628-001-cover.xhtml as a which implies that it should be referenced at nesting depth 3 in the navigation document.

However, looking at nav.xhtml, it seems to match the two-level section nesting (correctly) present in the content document:

<nav role="doc-toc" aria-labelledby="n1" epub:type="toc">
<h1 id="n1">Contents</h1>
<ol class="plain">
<li><a href="DTB37628-001-cover.xhtml#level1_1">Omslag</a>
<ol class="plain">
<li><a href="DTB37628-001-cover.xhtml#prodnote_1">Framsida</a></li>
<li><a href="DTB37628-001-cover.xhtml#prodnote_2">Baksida</a></li>
</ol>

This is the start of the content document:

<body>
<section id="level1_1" epub:type="cover" aria-label="Omslag">
<section class="frontcover" id="prodnote_1" aria-label="Framsida">
<figure class="image"><img alt="image" src="images/cover.jpg"/>
</figure>
</section>
<section class="rearcover" id="prodnote_2" aria-label="Baksida">
josteinaj commented 3 years ago

I'm guessing this is related to the new top-level <section> wrappers in the content documents.