Closed kalaspuffar closed 1 year ago
Hi @josteinaj
I have made the first part of the changes to this document. I wonder if we need to handle a depth larger than 6. I need to see an example to test this further. Maybe we should postpone that change until we have a document with significant depth.
Please review again.
Best regards Daniel
Hi @josteinaj
I slightly changed the xlst to get the section type of the document so we can check with the previous one. If the current document is a chapter with a previous part, we will add one to the section depth counter.
I hope this is a more robust solution. If I understand the specification, the epub:type
attribute is mandatory, and the role
attribute shall be used if a suitable role is available.
Please review it again.
Best regards Daniel
P.S. Forgot to mention I also removed the extra xslt documents and added them to ./createSchema.sh so we don't have to maintain these documents in two places. D.S.
I'll have to look more at this in January, I only have a couple of hours left until my Christmas vacation.
I need to check if we handle cases where a part does not have a visible headline (i.e. it uses aria-label
), and where there's a chapter with a aria-label
headline that follows a part, but is not in a part. In that corner case we might actually not be able to determine the depth based only on the content documents, but have to rely on the navigation document to determine if a section is in a part or not. We might also have to check for the bodymatter/backmatter boundary, we'll see.
Hi @josteinaj
Do we have any update on this PR?
Best regards Daniel
Hi @kalaspuffar.
Sorry, I haven't had time to look more into this.
I suspect we need more tests for this?
Hi @josteinaj
Well, I'll list the ones we have, and you decide if I should create another one.
Best regards Daniel
Ok, thank you. I'll look more at the tests later this week. But if I don't get time this week (which is likely), let's just merge it early next week and I'll assume it's fine.
Hi @josteinaj
I think this is the issue vaguely referred to in https://github.com/nlbdev/nordic-epub3-dtbook-migrator/issues/522.
Currently, we will error and say that chapters are in the wrong level if we don't have a heading giving it a specific value for the level. When you have chapters that only have a section
aria-label
, we can't have any opinion on the specific placement in the hierarchy.My fix might be a bit minimal, but if the XSLT doesn't create a
@data-heading-depth
, then we probably only have anaria-label
section. Is that enough of a check, or do I need to see if we don't have anaria-label-by
, then we need some work on the XSLT too?Best regards Daniel