epubcheck
epubcheck copied to clipboard
OPF Spine doesn't matched with NCX entries
Even though Apple checking the validation for "ERROR_EPUB_NCX_NAVPOINT_CHILD_ORDER" and it's not listed in all the ePub checker versions [Old - Latest].
Example Error message from Apple:
Asset validation error for file XXXXXXXXXXXXX.epub:
ERROR_EPUB_NCX_NAVPOINT_CHILD_ORDER: Found error in NCX file
(OEBPS/toc.ncx): The following entries are invalid in the given order:(Chapter navPoint-4 and navPoint-5 are in a different order than in the
Please provide a sample ePub file.
Sample ePub is uploaded. Zip package is not uploaded. So I've changed the extension, please change the extension .txt to .zip
You'll find that the order of content documents in the spine is not the same as the order in the NCX (contents and copyright are reversed).
Whether this should be an error is somewhat ambiguous, so both interpretations could be considered correct. What OPF says is that playOrder, when used, is supposed to match the linear order of the spine, so there should at least be a warning in this case:
Although playOrder attributes are not used to sequence SMIL content, if present, they should contain valid values that reflect the linear document reading order.
But since OPF 2 doesn't require the playOrder attribute, and doesn't say anything about the implied order of entries in the NCX matching the spine order, it's kind of open for interpretation what is valid or invalid. The DAISY specification has nothing to say on the subject, since playOrder was a required attribute.
EPUB 3 states that the toc nav entries have to follow the spine order and markup order within each document, so you can probably infer that's what OPF intended, too. Apple's chosen to take this approach, it seems.
EPUB 3 states that the toc nav entries have to follow the spine order and markup order within each document, so you can probably infer that's what OPF intended, too. Apple's chosen to take this approach, it seems.
Thanks for having a look, Matt!
From my daily work I can report that errors which appear only in the distribution phase (when sending to Apple, Amazon, etc.) which can't be reported by previous tools are very annoying for users...
So I would suggest to implement this behaviour also in EpubCheck, what do you think?
If you're asking about this specific test, then, yes, I'd agree that it should be in epubcheck. I can't see that having the ncx entries not match the spine order was the intended consequence of removing the playOrder attribute.
In general, though, unless it's a test that can be confirmed by the specifications, I'd say no. Epubcheck should validate to the specifications by default.
If there were a way of including vendor-specific tests for those who want to enable them, that's another issue. It seems like it could be a maintenance headache to get into if you have to make space for anyone who wants to include their own tests, so I leave those kinds of decisions to the epubcheck team.
Hey Matt,
no no, I'm totally with you! I was asking about this specific test!
We shoulnd't include vendor-specific tests, nobody can maintain that...
This is why we created FlightDeck. Retailer-specific requirements are constantly changing, and some require specialized testing tools like Apple Transporter. I don't think it makes sense for EpubCheck to include all of those tests.
Related to #353