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

Remaining issue with test book X50525A #483

Closed martinpub closed 3 years ago

martinpub commented 3 years ago

After #482, only one issue remain that prevents X50525A from being successfully validated:

[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="X50525A-10-chapter.xhtml#part-subchapter-1">)` in the navigation document is not nested at the correct level. The referenced document (X50525A-10-chapter.xhtml) occurs in the navigation document at nesting depth 2 (it is contained inside "Sample part"). The referenced headline (X50525A-10-chapter.xhtml#part-subchapter-1) occurs in the navigation document at nesting depth 2 (it is contained inside "Sample part"). The referenced headline (`<h2 id="part-subchapter_h1_1">Sample subchapter</h2>) occurs in the content document X50525A-10-chapter.xhtml as a `h2` which implies that it should be referenced at nesting depth 3 in the navigation document.

Any ideas @kalaspuffar, @AndersEkl? I think that <h2> is correct, and the nesting of the ToC list is on second level for that item?

AndersEkl commented 3 years ago

I haven't checked the code, but seems to me to be something that remains of the old rules, where if there were parts, <h2> in a subchapter would indeed be nested at depth 3 in the navigation document. With the new guidelines the nesting depth should match the heading level.

kalaspuffar commented 3 years ago

Hi @martinpub

I'm not sure, but I think the error message seems reasonable, but we will see this issue with the structural changes in 2020-1. As we added an extra section, we also added to the depth in the document. So what earlier was depth 2 is now depth 3.

Best regards Daniel

martinpub commented 3 years ago

Thanks for your comments @AndersEkl and @kalaspuffar. I think that the guidelines are very clear that <h2> should be used for the first chapter level below parts. Which implies that they should be nested at second level in the toc.

martinpub commented 3 years ago

Solved in #486