Better identify the category of error messages (e.g. "CSS parsing error") #302
Labels
priority: low
To be processed when time allows
status: accepted
Ready to be further processed
type: improvement
The issue suggests an improvement of an existing feature
From [email protected] on September 10, 2013 03:33:43
PROBLEM: The attached invalid_media_type.epub file fails epubcheck. Specifically, in its content.opf file, the definitions for the .otf fonts have the incorrect media-type. They should be "application/x-font-opentype", but are mistakenly defined as "text/css". As otf files are binary, interpreting them as text/css generates hundreds of "is not allowed here" warnings. For example:
There is no clear indication that something is wrong with the media-type.
METHOD:
(1) To reproduce the problem, run epubcheck on invalid_media_type.epub. You will get a long list of warnings
(2) I also an attached correct_media_type.epub, where the media-type values in content.opf have been corrected.
RESULT: A long list of "is not allowed here" warnings.
EXPECTED: It would be ideal if there was an error (or warning) indicating the exact source of the problem. Although we have no interest in using it, the FlightCrew utility does give clear errors, including the filename and the line number, for example:
A message similar to that would be perfect.
Even a more general message would be helpful, something like: "In content.opf, an has a media-type declared as a text mimetype, but is referencing a binary file."
PLATFORM: I am using epubcheck-3.0.1, on both OSX 10.8.5 (dev) and Linux 2.6.18-194.el5 (prod)
Attachment: invalid_media_type.epub correct_media_type.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=303
The text was updated successfully, but these errors were encountered: