epubcheck
epubcheck copied to clipboard
mapping doc validation future enhancements
So they don't get forgotten...
We don't check that the number of li elements in any given ul matches the number of renditions, only that there are at least two list items. Also, we need to check that each references a unique package document. As it is right now, all references could be to the same rendition and it'll validate fine.
Full CFI validation is needed at some point, of course, but an early step might be to verify that the package documents referenced by the CFIs actually exist in the container. The CFI can reference anything non-existent files, non-package documents, whatever, and be valid.
Hi @mattgarrish
I'm trying to figure out what to solve in this issue. I ran an epub with an incorrect CFI in my package file and got the following output.
FATAL(OPF-002): issue289.epub/META-INF/container.xml(-1,-1): The OPF file 'EPUB/does-not-exist-package.opf' was not found in the EPUB. ERROR(RSC-001): issue289.epub(-1,-1): File 'EPUB/does-not-exist-package.opf' could not be found.
Seems like a reasonable error to me.
What have I misunderstood?
best regards Daniel
That part might well be in place, as this is a couple of years old now.
More generally, this issue is about validating a rendition mapping document.
But a lot of these "satellite specs", as they're called, have no implementations, so I wouldn't prioritize solving this.
Hi @mattgarrish
Well, I was only looking into this issue because of the label "reviewed and ready for implementation"
best regards Daniel
Right, I'd just make this a low priority for implementing if there are other issues on your plate. You'd also need to check the number of renditions and that there are an equal number of mapping points in each list item for them. There's a general schema for the mapping document in the specification, but I'm not sure if it's being used yet to validate a linked document, either.
I'd forgotten I'd even opened this, to be honest... :)