-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
epubcheck 4 doesn't compare identifier in OPF and NCX anymore #669
Comments
Okay, this is still working! It IS currently reported, but only when you run EpubCheck with ReportLevel USAGE (commandline argument
This behaviour was changed by @rdeltour with cc349b0 to fix #329 and he set the severity to USAGE intentionally:
However, I think @rdeltour is wrong here... Since the NCX structure is defined through the DTBook standard I had a look there and read in section 8.4.1:
Therefore I would suggest the following:
Romain, what do you think? |
@rdeltour Romain, can you please give a short feedback on this issue? I already reviewed the code and wrote down two suggestions. Based on your feedback someone else can take over the issue and work on it. Thanks! 👍 |
This spec you quote is for DAISY’s Digital Talking Book, which do borrow OPF from IDPF (or rather, the Open eBook Forum as it was known back in the time) and define NCX and DTBook grammars. However, this spec itself, and its statements on OPF, can't be considered normative for EPUB which just imports the DTD grammars. In other words, the only normative statements are those defined in the EPUB specs, plus any requirements stemming from the DTDs. As far as I understand, EPUB 2.0.1 doesn't strictly require the NCX’s identifier to be the same as the OPF’s, so we're on the a blurry line between requirements and interpretation. I think an ERROR might be too strong however, I would suggest a WARNING when checking EPUB 2.0.1. @mattgarrish @TzviyaSiegman thoughts? |
It's a requirement for the NCX dtb:uid to match the package identifier per the second last bullet of 2.4.2 in OPF: (emphasis mine)
(Note that dtb:id is a longstanding error in the spec.) This would be true for both EPUB 2 and 3, since 3 inherits the NCX requirement from 2. If you're including an NCX. |
Oh, @mattgarrish is right of course. Then it's definitely an ERROR! |
Okay, thanks tp both of you for clarifying this! I'm raising the severity level to The current behaviour was introduced by @rdeltour in cc349b0 and looking at the commit, Romain also introduced Since the identifier now has to match the book id, leading or trailing whitespace may be an error anyway, shall we also raise severity level of |
Alright, I got this working. Although most of the work was fixing thos goddamn JSON tests 😡 Please have a look at PR #798. And give me feedback whether we should also raise the severity level of |
When checking EPUB 2 eBooks, epubcheck 4[.0.1] doesn't compare the identifier value in OPF and NCX anymore.
This is the result in epubcheck 3.0.1:
And this is the result of epubcheck 4[.0.1]:
I understand that comparing identifiers in EPUB 3 documents isn't required anymore, but I think the WARNING should still be issued when checking EPUB 2 files...
The text was updated successfully, but these errors were encountered: