nooyoo11 / epubcheck

Automatically exported from code.google.com/p/epubcheck
MIT License
1 stars 0 forks source link

media-type="xhtml/css" #244

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
PROBLEM:

I have observed the following string used (incorrectly) in the OPF file: 
media-type="xhtml/css"

My developers tell me this is an invalid media-type and most browsers ignore 
the CSS file when this is in the OPF file. It should be media-type="text/css". 
EpubCheck should detect this error but it does not.

METHOD:

What steps will reproduce the problem?
1. Edit a valid EPUB such that a CSS file declared in the manifest uses the 
above string.
2. Validate the file.

RESULT:

An error is not thrown.

EXPECTED:

An error should be thrown: media-type="xhtml/css" is not a valid media-type.

PLATFORM:

EpubCheck3.0 (first release, not beta or release candidate)

Original issue reported on code.google.com by ncraiggo...@gmail.com on 24 Jan 2013 at 2:43

GoogleCodeExporter commented 9 years ago

Original comment by rdeltour@gmail.com on 8 Mar 2013 at 11:56

GoogleCodeExporter commented 9 years ago

Original comment by markus.g...@gmail.com on 26 Mar 2013 at 12:38

GoogleCodeExporter commented 9 years ago
This is more complicated than it seems. Non-core media types are allowed if 
fallbacks are provided, so 'xhtml/css' is not invalid in itself. The problem is 
that given a resource in the manifest, it is quite difficult to know if a 
fallback is provided (it requires to look at all the content docs, and possibly 
further).

I can see two resolution options:

1. issue a warning (straightforward – in the OPF checks)
2. catch the missing fallback when checking the content doc's references (more 
complex, wouldn't be caught if the OPF is validated standalone).

Original comment by rdeltour@gmail.com on 27 Mar 2013 at 1:41

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r455.

Original comment by rdeltour@gmail.com on 29 Mar 2013 at 2:19