mxp1988 / epubcheck

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

Absolute root file refs (in CSS at least) generate error while equivalent relatives do not #233

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
PROBLEM:

Example: From css/template.css, references to ../fonts/someFont.otf or 
../images/someImage.jpg are (and should be) considered valid, but equivalent 
references to /fonts/someFont.otf or /images/someImage.jpg generate errors 
"'OEBPS/css//fonts/someFont.otf': referenced resource missing in the package."

METHOD:

What steps will reproduce the problem?

Consider above information from location info as:

OEBPS/css
OEBPS/fonts
OEBPS/images

RESULT:

OEBPS/css/ is prefixed to the supplied absolute URL /fonts/, etc., resulting in 
OEBPS/css//fonts/someFont.otf

EXPECTED:

I would expect that the result would be the equivalent of 
OEBPS/fonts/someFont.otf, which is the same location (from 
OEBPS/css/template.css) as ../fonts/someFont.otf.

PLATFORM:

EPUBcheck rc2, Mac OS 10.6.8

ADDITIONAL INFO:

Am I misunderstanding what should be happening here?

Original issue reported on code.google.com by Richard.C.Gordon on 16 Dec 2012 at 9:09

GoogleCodeExporter commented 8 years ago
Absolute URIs are not allowed in EPUB:
http://idpf.org/epub/30/spec/epub30-ocf.html#sec-container-iri
(see also section 1.6.1 of OCF 2.0.1 for EPUB 2).

So a reference to "/fonts/someFont.otf" is not allowed.

The error message should be improved (e.g. "Absolute URI references are not 
allowed") but the validation behavior is correct.

Original comment by rdeltour@gmail.com on 17 Dec 2012 at 8:41

GoogleCodeExporter commented 8 years ago

Original comment by markus.g...@gmail.com on 17 Dec 2012 at 10:48