daniel782 / epubcheck

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

OPF manifest should be checked for cover item existence #74

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
PROBLEM:

epubcheck does not raise a warning if an opf:meta element for a cover refers to 
an opf:manifest/opf:item that does not exist. The de-facto standard for 
referencing cover images is to point to an opf:item/@id with an 
opf:meta[@name="cover"]/@content.

METHOD:

Validate an EPUB with a broken OPF:
{{{
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" 
unique-identifier="articleid">
  <metadata>
    <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/" id="articleid">_id4566dsadasd47</dc:identifier>
    <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Tiny book</dc:title>
    <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language>
    <meta name="cover" content="cover-image"/>
  </metadata>
  <manifest>
    <item id="ncxtoc" media-type="application/x-dtbncx+xml" href="toc.ncx"/>
    <item id="id456647" href="index.html" media-type="application/xhtml+xml"/>
  </manifest>
}}}

RESULT:

No warning is raised.

EXPECTED:

A warning should be raised.

PLATFORM:

What version of the product are you using? epubcheck 1.0.5

ADDITIONAL INFO:

An EPUB that should generate a warning is attached. 

Original issue reported on code.google.com by abdela...@gmail.com on 29 Aug 2010 at 10:15

Attachments:

GoogleCodeExporter commented 8 years ago
Assigning as low priority only because this isn't actually part of the 
standard, but agree that it should be a warning since the intent of the user is 
clear (that this is a cover image and should be in the package).

Original comment by liza31337@gmail.com on 31 Aug 2010 at 3:28

GoogleCodeExporter commented 8 years ago

Original comment by markus.g...@gmail.com on 11 Oct 2012 at 8:32

GoogleCodeExporter commented 8 years ago
How about reporting this as a "hint", using the newly introduced hint method in 
3.0.1 ?

Original comment by tobias.c...@gmail.com on 27 May 2013 at 10:57

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r510.

Original comment by tledou...@gmail.com on 28 Jun 2013 at 8:07