agamez26 / epubcheck

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

Warning reported twice in OPF file (and with incorrect resource location) #253

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
PROBLEM:

In the EPUB I have an image file which has a French accent in its name:

éxisting.jpg

The file is referenced from the OPF file like:

 <item id="imageID-4" media-type="image/jpeg"
            href="images/éxisting.jpg"/>

When validating the EPUB Checker reports two warnings for the same problem.

Another improvement which could be made:

On the callback:

com.adobe.epubcheck.api.Report.warning(String, int, int, String)

Instead of reporting as a location of the problem the image resource itself, 
the 
location of the problem should be reported the OPF file + correct line and 
number where the reference to the image is made.

What steps will reproduce the problem?

Validate an EPUB which references in the OPF an image name with non-ascii 
characters.

Original issue reported on code.google.com by raducor...@gmail.com on 20 Feb 2013 at 10:27

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
At least the doubled warning message is a duplicate of issue 239 which I fixed 
on the weekend.
With r444 I changed validation behaviour. For EPUB validation, only the files 
in the container are checked for non-ascii characters, not the manifest items 
anymore. For OPF single file validation the manifest items are beeing checked. 
See my comment on issue 239 for further details.

If I understand Radu correctly, we now should provide OPF line/col as the 
source of warning when single-file validating the OPF file and not the file 
itself.
This said, we would need a different method for 
OCFFilenameChecker.checkCompatiblyEscaped() to provide line/col from the OPF 
file.

Original comment by tobias.c...@gmail.com on 26 Mar 2013 at 1:28

GoogleCodeExporter commented 9 years ago
I confirm that the double warning is fixed by the fix of issue 239 (thanks 
Tobias!).

I don't think the location in the OPF should be reported. This is primarily an 
OCF issue: it's really about the files, not their corresponding 'item' element 
in the OPF.

I'm closing the issue, feel free to reopen if you disagree.

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

GoogleCodeExporter commented 9 years ago
Thanks for fixing the main issue, reporting a different location for the error 
was just a suggestion.

Original comment by raducor...@gmail.com on 15 Apr 2013 at 3:51