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

Fixing issue with parts and chapters being in differnt files. #534

Closed kalaspuffar closed 1 year ago

kalaspuffar commented 1 year ago

Hi @josteinaj

In this PR I've updated the list-heading-and-pagebreak-references.xsl files in the client so we have the right input data to the other schema files. Not sure why these were diffing.

I also added a test case and changed the code to handle the occurrence when you have a part and chapter in different files. The logic was complicated there, and I don't see a reason for it. I also updated one of the test books as it was incorrect.

Last but not least, the test book X50525A was incorrect regarding aria-described-by for images. The tests must have failed before, but I have not seen them. So had to fix this, so the tests passed.

Best regards Daniel

kalaspuffar commented 1 year ago

Hi @josteinaj

I answer here as it's more of a general observation than connected to anything you have reported. These test files were copied from an old book and then adopted to test specific things. We are not running tests on all files, meaning the incorrect ones would not trigger the error.

I've added sections to those files and then updated the indentation. The tests still pass, so I think the code is still valid, and the test case should be correct. But I copied these files before we had a proper test book available from MTM.

Maybe I need to do a retake on the tests and update with the latest iteration of the test book in the validator, or perhaps even use the files in the repository instead, as we now have them in the same repository.

Best regards Daniel