Code Monkey home page Code Monkey logo

epubcheck's Introduction

This folder contains the sources of epubcheck project.

EpubCheck is a tool to validate IDPF Epub files. It can detect many
types of errors in Epub. OCF container structure, OPF and OPS mark-up,
and internal reference consistency are checked. EpubCheck can be run
as a standalone command-line tool, installed as a web application or
used as a library.

Epubcheck project home: http://code.google.com/p/epubcheck/

BUILDING

To build epubcheck from the sources you need Java Development Kit (JDK) 1.5 or above
and Apache Maven (http://maven.apache.org/) 2.3 or above installed

Run:

    mvn install
 

epubcheck's People

Contributors

rdeltour avatar tofi86 avatar tledoux avatar mgylling avatar

epubcheck's Issues

Epub Errors?

PROBLEM:Not sure how to fix errors generated by Epub validator. 

Give a brief description of the problem
I'm working for a small publishing house, and we have been creating PRC 
files for Kindle, Mobipocket, and Barnes and Noble, but we have been 
having issues converting books into Epubs. 
METHOD:We use ABBY Finereader to extract the HTML from the PDF, edit with 
Notepad++, create the PRC with Mobipocket creator, and convert the PRC to 
Epub using Calibre. Adobe digital editions will read our Epubs and Sony 
Reader can read only some of them. When we try to validate them on your 
site, it comes up with a list of errors that we have tried to decypher and 
fix using your information on your website. But maybe since we're new to 
this, we don't know what we're doing, because we can't figure it out. I'll 
attach one of our Epubs, so you can take a look.

What steps will reproduce the problem?
1.
2.
3.

RESULT:Invalid Epub

What happens?

EXPECTED:

What did you expect to happen? It is very important to state what your 
expectation is.

PLATFORM:

What version of the product are you using? On what operating system?

ADDITIONAL INFO:

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 16 Oct 2009 at 6:19

Attachments:

I/O Error

PROBLEM:

While executing the epub validation tool version epubcheck-1.0.4.jar, i 
found the below error. Epub is not getting validated successfully.

METHOD:

What steps will reproduce the problem?
1. Run epub validation

RESULT:

Error: 9781842557358_Legend.epub: I/O error reading 
OEBPS/john_9781842557358_oeb_cop_r1.html.

EXPECTED:

Nill error in epub validation

PLATFORM:

Windows 2000


Original issue reported on code.google.com by [email protected] on 22 Oct 2009 at 8:43

  • Merged into: #49

Missing required attributes in OPF are not reported as errors

PROBLEM:

When epubchecker is run on an epub with an OPF files that is missing
attributes that are required by the OPF schema, no error is reported.

METHOD:

What steps will reproduce the problem?
1. Run epubchecker on the attached epub file sherlock_notoc.epub

RESULT:

mimetype error is reported, but no other errors.

EXPECTED:

Expect an error such as:
ERROR: sherlock_notoc.epub/OEBPS/content.opf(35): spine element missing
required attribute 'toc'.

PLATFORM:

Latest code from svn (r97)
Windows Vista
JRE 1.6

ADDITIONAL INFO:

N/A

Original issue reported on code.google.com by [email protected] on 16 Nov 2008 at 12:02

Attachments:

Invalid DTDs not flagged

Trying to validate documents with invalid DTDs does *not* generate an 
error to that effect. [see issue 1]

Original issue reported on code.google.com by [email protected] on 13 Jan 2008 at 9:26

Incorrectly flagging NCX pointers to non-primary content types even when a fallback is supplied

epubcheck is returning:
ERROR: ../math.epub/OEBPS/toc.ncx(18): hyperlink to non-standard resource
'OEBPS/math.xml' of type 'application/mathml+xml'

but I believe this file is actually valid since a fallback was supplied in
the OPF.

Details in this post:
http://blog.threepress.org/2009/11/09/secrets-of-epub-out-of-line-xml-islands-an
d-fallbacks/

The test document is attached.

Original issue reported on code.google.com by [email protected] on 9 Nov 2009 at 5:40

Attachments:

OPF schema is incorrect

PROBLEM:

The OPS schema contained in the distribution (opf20.rng) is different from
the Relax NG schema defined in Appendix A of the OPF specification.

http://www.openebook.org/2007/opf/OPF_2.0_final_spec.html#AppendixA

METHOD:

Compare com.adobe.epubcheck\src\com\adobe\epubcheck\rng\opf20.rng to the
schema defined in the spec.  Be sure to take into account the deleted parts
of the schema marked with the <del> tag in the spec.

PLATFORM:

epubcheck 1.0.2

ADDITIONAL INFO:

Please see attached patch that brings the schema up to spec.

- Correct name of 'schema' attribute of <meta> element to 'scheme'
- Remove <optional> from 'toc' attribute of <spine>
- guide-content may contain <zeroOrMore> instances of reference-element,
rather than <oneOrMore>
- No-op change in order of attributes of reference-element to match spec



Original issue reported on code.google.com by [email protected] on 10 Nov 2008 at 8:33

Attachments:

Formatting of dc:date in OPF

OPF spec says for dc:date:

>Date of publication, in the format defined by "Date and Time Formats" at
http://www.w3.org/TR/NOTE-datetime and by ISO 8601 on which it is based. In
particular, dates without times are represented in the form YYYY[-MM[-DD]]:
a required 4-digit year, an optional 2-digit month, and if the month is
given, an optional 2-digit day of month. 

ePubCheck does not appear to enforce any restrictions on the content of
dc:date (I've seen DD/MM/YY)

Dave Cramer
TexTech, Inc.

Original issue reported on code.google.com by [email protected] on 15 Sep 2009 at 4:00

epubcheck does not check anything about DRM

PROBLEM:

If you run epubcheck on a DRMed file, it would give some rather strange
diagnostrics.

METHOD:

What steps will reproduce the problem?
1. get a DRMed file
2. java -jar epubcheck.jar DRMed.epub

RESULT:

What happens?

The file OEBPS/path/to/file does not appear to be of type image/jpeg
<file>: bad continuation of multi-byte UTF-8 sequence (code: 0xffffffe1)
<another-file>: invalid UTF-8 byte (check the XML declaration) (code: 0x88)
...

EXPECTED:

What did you expect to happen? It is very important to state what your
expectation is.
<file>: is encrypted according to META-INF/encryption.xml
<another-file>: is encrypted according to META-INF/encryption.xml

PLATFORM:

What version of the product are you using? On what operating system?
Mac OS X: 10.5.3
epubcheck: 0.9.5

Original issue reported on code.google.com by [email protected] on 5 Jul 2008 at 7:01

Check for the existence of useless files such as Thumbs.db

Some badly-made ePub archives contain useless metadata files such as
Thumbs.db or even "backup" zip files of the archive.
They can add to the ePub file size quite a bit.

Perhaps epubcheck could specifically check for Thumbs.db or, more
generally, warn about files that aren't in the manifest.

Original issue reported on code.google.com by [email protected] on 1 Sep 2009 at 6:07

  • Merged into: #58

checker reports image/jpeg as non-standard media-type requiring fallback

including jpegs in manifest of this attached epub results in the following
validation errors:

Desktop/15675-h.epub/index.opf(14): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(15): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(16): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(17): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(18): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(19): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(20): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(21): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(22): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(23): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(24): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(25): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(26): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(27): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(28): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(29): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(30): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(31): non-standard media-type 'image/jpeg'
with no fallback
Desktop/15675-h.epub/index.opf(32): non-standard media-type 'image/jpeg'
with no fallback

manifest items look like this:

    <item id="image485abb0d57476"
href="html/15675-h/images/dampier-nh1-10.jpg" media-type="image/jpeg"/>
    <item id="image485abb0d5a744"
href="html/15675-h/images/dampier-nh1-01.jpg" media-type="image/jpeg"/>
    <item id="image485abb0d6acf3"
href="html/15675-h/images/dampier-nh1-02.jpg" media-type="image/jpeg"/>
    <item id="image485abb0d77048"
href="html/15675-h/images/dampier-nh1-03.jpg" media-type="image/jpeg"/>
    <item id="image485abb0d83b63"
href="html/15675-h/images/dampier-nh1-04.jpg" media-type="image/jpeg"/>
    <item id="image485abb0d91dec"
href="html/15675-h/images/dampier-nh1-05.jpg" media-type="image/jpeg"/>
    <item id="image485abb0d9682a"
href="html/15675-h/images/dampier-nh1-06.jpg" media-type="image/jpeg"/>
    <item id="image485abb0da3738"
href="html/15675-h/images/dampier-nh1-07.jpg" media-type="image/jpeg"/>
    <item id="image485abb0da8168"
href="html/15675-h/images/dampier-nh1-08.jpg" media-type="image/jpeg"/>
    <item id="image485abb0dad36e"
href="html/15675-h/images/dampier-nh1-09.jpg" media-type="image/jpeg"/>
    <item id="image485abb0db7f48"
href="html/15675-h/images/dampier-nh1-00.jpg" media-type="image/jpeg"/>
    <item id="image485abb0dbe8bd"
href="html/15675-h/images/dampier-nh1-11.jpg" media-type="image/jpeg"/>
    <item id="image485abb0dc467c"
href="html/15675-h/images/dampier-nh1-12.jpg" media-type="image/jpeg"/>
    <item id="image485abb0dcac0b"
href="html/15675-h/images/dampier-nh1-13.jpg" media-type="image/jpeg"/>
    <item id="image485abb0dcfe12"
href="html/15675-h/images/dampier-nh1-14.jpg" media-type="image/jpeg"/>
    <item id="image485abb0dd4849"
href="html/15675-h/images/dampier-nh1-15.jpg" media-type="image/jpeg"/>
    <item id="image485abb0ddadd9"
href="html/15675-h/images/dampier-nh1-16.jpg" media-type="image/jpeg"/>
    <item id="image485abb0ded6b5"
href="html/15675-h/images/dampier-nh1-17.jpg" media-type="image/jpeg"/>
    <item id="image485abb0df114c"
href="html/15675-h/images/dampier-nh1-18.jpg" media-type="image/jpeg"/>


spine references to those items:

    <itemref idref="image485abb0d57476" linear="no"/>
    <itemref idref="image485abb0d5a744" linear="no"/>
    <itemref idref="image485abb0d6acf3" linear="no"/>
    <itemref idref="image485abb0d77048" linear="no"/>
    <itemref idref="image485abb0d83b63" linear="no"/>
    <itemref idref="image485abb0d91dec" linear="no"/>
    <itemref idref="image485abb0d9682a" linear="no"/>
    <itemref idref="image485abb0da3738" linear="no"/>
    <itemref idref="image485abb0da8168" linear="no"/>
    <itemref idref="image485abb0dad36e" linear="no"/>
    <itemref idref="image485abb0db7f48" linear="no"/>
    <itemref idref="image485abb0dbe8bd" linear="no"/>
    <itemref idref="image485abb0dc467c" linear="no"/>
    <itemref idref="image485abb0dcac0b" linear="no"/>
    <itemref idref="image485abb0dcfe12" linear="no"/>
    <itemref idref="image485abb0dd4849" linear="no"/>
    <itemref idref="image485abb0ddadd9" linear="no"/>
    <itemref idref="image485abb0ded6b5" linear="no"/>
    <itemref idref="image485abb0df114c" linear="no"/>


as far as I know, jpeg is still a core media type for ops...




Original issue reported on code.google.com by [email protected] on 19 Jun 2008 at 8:20

Attachments:

NCX navLabel Error

PROBLEM:

In a sample epub file downloaded from 
http://www.idpf.org/2007/ops/samples/myantonia.epub, the validator 
produces error "Required elements missing".
METHOD:

What steps will reproduce the problem?
1.
2.
3.

RESULT:

Inside <navMap>, there's a <navLabel> element, before the <navPoint>.  
epubcheck expects <navPoint> right after <navMap>, therefore, giving error

EXPECTED:

Inside <navMap>, <navLabel> element is right accoriding to the DTD.  So 
there shouldn't be any error in this case.


PLATFORM:

What version of the product are you using? On what operating system?

ADDITIONAL INFO:

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 26 Sep 2008 at 5:30

xmldsig namespace

src/com/adob/epubcheck/rng/signatures.rng uses

ns="http://www.w3.org/2001/04/xmldsig#"

Shouldn't this be "http://www.w3.org/2000/09/xmldsig#" ?

Original issue reported on code.google.com by [email protected] on 16 Sep 2009 at 10:29

Failed to run epubcheck on Mac OSX - java.lang.ExceptionInInitializerError

PROBLEM:

When running on command line, using epubcheck jar, and given a epub file as
argument, got java.lang.ExceptionInInitializerError

METHOD:

To reproduce the problem:

1. Get attached file(seems like any epub file would fail.)
2. Run like java -jar epubcheck-1.0.4.jar donQuixote.epub  

RESULT:

Got an exception of type : java.lang.ExceptionInInitializerError
Output from command line is like: 

pubcheck Version 1.0.4

Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.adobe.epubcheck.api.EpubCheck.validate(EpubCheck.java:127)
    at com.adobe.epubcheck.tool.Checker.main(Checker.java:48)
Caused by: java.lang.NullPointerException
    at
org.relaxng.datatype.helpers.DatatypeLibraryLoader$Service$Loader2.getResources(
DatatypeLibraryLoader.java:151)
    at
org.relaxng.datatype.helpers.DatatypeLibraryLoader$Service.<init>(DatatypeLibrar
yLoader.java:173)
    at
org.relaxng.datatype.helpers.DatatypeLibraryLoader.<init>(DatatypeLibraryLoader.
java:57)
    at
com.thaiopensource.relaxng.impl.SchemaReceiverImpl.installHandlers(SchemaReceive
rImpl.java:36)
    at
com.thaiopensource.validate.auto.AutoSchemaReceiver$Handler.startElement(AutoSch
emaReceiver.java:54)
    at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Abstra
ctSAXParser.java:501)
    at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElemen
t(XMLNSDocumentScannerImpl.java:400)
    at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver
.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentC
ontentDriver.next(XMLDocumentFragmentScannerImpl.java:3095)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next
(XMLDocumentScannerImpl.java:921)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentS
cannerImpl.java:648)
    at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocum
entScannerImpl.java:140)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocum
ent(XMLDocumentFragmentScannerImpl.java:510)
    at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configu
ration.java:807)
    at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configu
ration.java:737)
    at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
    at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXPa
rser.java:1205)
    at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXPar
serImpl.java:522)
    at
com.thaiopensource.validate.auto.AutoSchemaReader.createSchema(AutoSchemaReader.
java:68)
    at com.adobe.epubcheck.xml.XMLValidator.<init>(XMLValidator.java:128)
    at com.adobe.epubcheck.ocf.OCFChecker.<clinit>(OCFChecker.java:42)
    ... 2 more


EXPECTED:

Expected to validate a file. File is valid. Can be open in Adobe Digital
Editions

PLATFORM:

- epubcheck-1.0.3 and epubcheck-1.0.4 (both failed)
- Mac OSX Leopard 10.5.7
- java : Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)


Original issue reported on code.google.com by [email protected] on 11 Jun 2009 at 9:32

Attachments:

If @playOrder="1" appears more than once in an ncx file, epubcheck detects an error.

PROBLEM:

Give a brief description of the problem

I have an ncx file that references the first page multiple times.
ePubCheck raises the following error:

first playOrder value is not 1

even though the first playOrder value is 1.


METHOD:

What steps will reproduce the problem?
1.
create an ePub with an ncx file that contains two nodes with playOrder = 1 
(a modified Test.epub exhibiting the bug is attached)
2.
run it through ePubcheck

RESULT:

What happens?
the error message is:
ERROR: /tmp/Test-ncx-playOrder1.epub/OEBPS/toc.ncx(3): assertion failed:   
first playOrder 
value is not 1


EXPECTED:

I do not expect having two nodes with playOrder = 1 an error, like it's no 
error to have two nodes 
with any other playNode, as long as the referenced resource is the same.

PLATFORM:

Java, 1.0.3 and 1.0.4 tested

ADDITIONAL INFO:

I think that this test in ncx.sch should test for >= 1 instead of exactly = 1, 
or that the error 
message's text is misleading:

  <sch:pattern name="ncx_playOrderOrigin" id="ncx_playOrderOrigin">
      <!-- The sequence of play orders includes one with the value 1 -->
      <sch:rule context="ncx:ncx">
        <sch:assert test="count(//*[@playOrder='1'])=1">
          first playOrder value is not 1
        </sch:assert>
      </sch:rule>
  </sch:pattern>





Original issue reported on code.google.com by jens.quade on 4 Jan 2009 at 2:24

Attachments:

Warn when XHTML items have NCX entries but no entry in the OPF spine

Many reading systems have problems allowing a user to navigate to content
that is in the NCX (or an anchor link in the XHTML) but is *not* in the OPF
spine.

See http://code.google.com/p/threepress/issues/detail?id=153 for details.

Example attached.

Either epubpreflight or epubcheck should WARN about this.

Original issue reported on code.google.com by [email protected] on 20 Aug 2009 at 7:59

Attachments:

epubcheck does not complain about non-UTF-8 or UTF-16 encodings

PROBLEM:

epubcheck will pass as valid files which have contents encoded in
ISO-8859-1 (whether in the XHTML content, the NCX or the OPF).

METHOD:

What steps will reproduce the problem?
1. Validate the attached file which contains a XHTML content file in
ISO-8859-1 with a high-bit character. 


RESULT:

The file passed validation.

EXPECTED:

The file should not have validated and the error message should have
indicated an encoding problem.


Original issue reported on code.google.com by [email protected] on 14 May 2009 at 11:23

Attachments:

Epubcheck reports misleading errors when entities are not declared

PROBLEM:

We've been going through the output of epubcheck against a few hundred
titles and we've come across misleading error outptut. If an xhtml file
contains an entity which is not declared, the validation error on the xhtml
file is not reported. However, any links into that file are reported as
'fragment identifier is not defined'. 

METHOD:

Create an epub file containing an xhtml file which uses a character entity
which has not been declared. Ensure that other files link to fragment
identifiers in this file. Run epubcheck.

RESULT:

Epubcheck reports 'fragment identifier is not defined'. It does not report
any errors with respect to the validity of the file.

EXPECTED:

Epubcheck should report that the xhtml file is problematic given the
undeclared entity.

PLATFORM:

Version 1.0.1 on both OSX and XP.



Original issue reported on code.google.com by [email protected] on 7 Oct 2008 at 10:45

epubcheck passes but ADE complains

PROBLEM:
I am running epubcheck on a variety of documents. epubcheck reports success
on these files - "No errors or warnings detected". But when I open these
files in ADE and go to Item Info, I get the following - 
"The document appears to have minor errors that might cause it to be
displayed incorrectly."

Any suggestions what types of errors are not covered by epubcheck but which
ADE complains about? 

METHOD:
1. Run epubcheck on the attached document
2. See that the check reports success
3. Open the attached document in ADE. Go to Item Info

RESULT:
See that following error is reported by ADE without further details:
"The document appears to have minor errors that might cause it to be
displayed incorrectly."

PLATFORM:
Windows XP 



Original issue reported on code.google.com by [email protected] on 15 Sep 2009 at 1:46

Attachments:

Check attribute values in opf:role

The OPF 2.0 spec seems to impose certain restrictions on attribute values
for opf:role which ePubCheck is not enforcing. 

The spec says, 

>The normative list of values used for the role  attribute is defined by
the MARC relator code list (http://www.loc.gov/marc/relators/). When roles
are specified, the 3-character registered MARC values must be used when
applicable. Although that list is extensive, other values may be added if a
desired role is not covered by those predefined values. Such values must
begin with oth., and shall be considered subdivisions of the other relator
code. Like other constructs in this specification, these values are
case-sensitive and must be coded entirely in lower-case. 

I've seen ePubs that use dc:creator opf:role="Author" which as far as I can
tell is forbidden (should be opf:role="aut"), but ePubCheck does not raise
an error.

Dave Cramer
TexTech, Inc.




Original issue reported on code.google.com by [email protected] on 15 Sep 2009 at 3:58

Warn on empty opf:item/@media-type

PROBLEM:

epubcheck should warn on empty media-type attributes in OPF files.

METHOD:

What steps will reproduce the problem?
1. test svg.epub (attached)
2. Find empty opf:item/@media-type in OEBPS/content.opf
  <item xmlns="http://www.idpf.org/2007/opf" id="id962741"
href="graphics/svg-001.xml" media-type=""/>
3. Warn

RESULT:

No warning:

$ epubcheck svg.epub 
No errors or warnings detected

EXPECTED:

WARNING: Empty media-type attribute at blah blah

PLATFORM:

epubcheck-0.9.3, Mac.

ADDITIONAL INFO:

See attached

Original issue reported on code.google.com by [email protected] on 7 Mar 2008 at 6:02

Attachments:

epubcheck 1.0.3 does not flag the absence of an NCX file at all

PROBLEM:

ePubs which have no NCX file of any kind are not flagged as being invalid.

OPF 2.0: http://idpf.org/2007/opf/OPF_2.0_final_spec.html (What is up
with copy and paste from that document? <ins> and <del> were a
mistake)

"""
 1.4.1.2: Publication Conformance

A collection of files is a conforming OPS Publication if and only if:
...
vii. an NCX must be included; and
"""

"""
 The spine element must  include the toc attribute, whose value is the
the id attribute value of the required NCX document declared in
manifest  (see Section 2.4.1.)
"""


METHOD:

What steps will reproduce the problem?
1. Create an epub with no NCX file

RESULT:

The epub is reported as valid.

EXPECTED:

The epub should be reported as invalid.

PLATFORM:

epubcheck 1.0.3, Linux

ADDITIONAL INFO:

This error condition occurs when no @ncx attribute is included on the
<opf:spine>.  This is itself an error although it is an error found in the
IDPF schema as well.

Original issue reported on code.google.com by [email protected] on 20 Mar 2009 at 2:32

Allow @hrefs starting with irc://

PROBLEM:

Epubcheck should allow a/@hrefs that begin with 

METHOD:

What steps will reproduce the problem?
1. Create an .epub with an @href to an irc channel
2. Epubcheck it


RESULT:

book.epub/OEBPS/apcs03.html(43):
'OEBPS/irc://irc.freenode.net/wikipedia-en-help': referenced resource
missing in the package

From <a class="ulink"
href="irc://irc.freenode.net/wikipedia-en-help">irc://irc.f

EXPECTED:

No errors

See attached patch against
http://epubcheck.googlecode.com/svn/trunk/com.adobe.epubcheck/src/com/adobe/epub
check/ops/OPSHandler.java


Original issue reported on code.google.com by [email protected] on 30 May 2008 at 4:20

Attachments:

use of Xalan Hashtable impl

PROBLEM:

    [javac]
C:\projects\googlecode\epubcheck\com.adobe.epubcheck\src\com\adobe\epubcheck\ocf
\OCFPackage.java:8:
warning: com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable is Sun
proprietary API and may be removed in a future release


Proposal: just use Java Collections API

Original issue reported on code.google.com by [email protected] on 9 Sep 2009 at 9:51

Attachments:

Validation of SVG

PROBLEM:

epubcheck seems to check also included svg files. He reports the whole file
to error console if the svg has embeded image files. This makes it not easy
to parse the error console output.

Hope you can fix this problem or disable the check of svg-files.

Source of the file like (shorten):

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version:
6.00 Build 14948)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     width="500px" height="504px" viewBox="0 0 500 504" enable-background="new
0 0 500 504" xml:space="preserve">
<image overflow="visible" enable-background="new    " width="500"
height="504" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJR
....
79797979797979797/9k=">
</image>
</svg>

RESULT (shorten because - comment is too long):

ERROR: E:\ePubber Projects\1
Schwarz.epub/OEBPS/images/chap01_img02.svg(2566):
'OEBPS/images/data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/4S0cRXhpZgAATU0
AKgAAAAgABwESAAMAAAABAAEAAAEaAAUA
AAABAAAAYgEbAAUAAAABAAAAagEoAAMAAAABAAIAAAExAAIAAAAbAAAAcgEyAAIAAAAUAAAAjYdmyZ9v
UtHtHL9
c52GDM4UUtHgTTyYupSOppjEI3UOlrlpHwky/wD3mx85z/r9u7H/APtUe1B/soeU/wC8uvmP/wAe 
n/dX/maGz/8AOf8APU/8y0/4
z/pp/zX/Nr3/9k=': referenced resource missing in the package

Original issue reported on code.google.com by [email protected] on 2 Apr 2009 at 2:12

Missing Required Elements in OPF are not reported as errors

PROBLEM:

When epubchecker is run on an epub with an OPF files that is missing
elements that are required by the OPF schema, no error is reported.

METHOD:

What steps will reproduce the problem?
1. Run epubchecker on the attached epub file sherlock_nospine.epub

RESULT:

mimetype error is reported, but no other errors.

EXPECTED:

Expect an error such as:
ERROR: sherlock_notoc.epub/OEBPS/content.opf(35): required element <spine>
is missing.

PLATFORM:

Latest code from svn (r97)
Windows Vista
JRE 1.6

ADDITIONAL INFO:

Though no error is reported by epubcheck, the file fails to open in ADE.


Original issue reported on code.google.com by [email protected] on 16 Nov 2008 at 12:09

Attachments:

epubcheck command line tool should return 1 on failing .epub document

PROBLEM:

epubcheck commandline tool should return non-zero status code on failure.

METHOD:

What steps will reproduce the problem?
(epubcheck-0.9.3)
$ touch notepub.epub
$ java -jar epubcheck.jar notepub.epub 
notepub.epub: cannot read header
notepub.epub: I/O error: error in opening zip file
$ echo $?
0

RESULT:

Returns 0

EXPECTED:

Returns 1

PLATFORM:

Mac, doesn't matter.


Original issue reported on code.google.com by [email protected] on 24 Feb 2008 at 2:05

Missing README/INSTALL with build instructions

The source tree should have a README and/or INSTALL file with simple
instructions on how to compile and build epubcheck.

It should also have a short description of the project, and a link to the
project page.

Original issue reported on code.google.com by [email protected] on 9 Sep 2008 at 1:04

doesn't check that all files included in package are listed in the mansfest

PROBLEM:

Give a brief description of the problem

METHOD:

What steps will reproduce the problem?
1. Build an .epub with extra files inside the zip
2. validate the epub

RESULT:

The epub validates

EXPECTED:

What did you expect to happen? It is very important to state what your
expectation is.

The validator should warn about the presence of files not referenced in the
mansfest

PLATFORM:

Using the web-based validator

ADDITIONAL INFO:

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 25 Jun 2009 at 3:12

XHTML validation by xhtml-math-svg-flat.dtd

PROBLEM:

We are "Hindawi Publishing Corporation" using "xhtml-math-svg-flat.dtd" by
the following Doctype:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG
1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd">


RESULT:

Generated error message:
Unresolved external XML entity
'http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd'


EXPECTED:

I think that xhtml-math-svg-flat.dtd is not included in epubcheck-1.0.4 to
validate xhtml 1.1 with SVG 1.1

PLATFORM:

epubcheck-1.0.4
Windows-XP

Thanks..

Wael Abdelsattar
Production Developer
Hindawi Publishing Corporation
http://www.hindawi.com/epub.html


Original issue reported on code.google.com by [email protected] on 12 Apr 2009 at 8:18

Check fails when unique-identifier starts with a number

Whenever my unique identifier (in my case, a randomly generated UUID)
happens to start with a number, I get the error:

OEBPS/content.opf:1 bad value for attribute "unique-identifier"

An example value that causes the failure is: "1827c6d4c3c444459bb8fdb2be367fe6"

However, when my UUID happens to start with a letter, it works fine.

I can't find anything in the OPF or Dublin Core specs that says a unique
identifier cannot start with a number.

Original issue reported on code.google.com by [email protected] on 27 Mar 2008 at 5:12

identifier elements do not require id attributes

epubcheck 0.9.5 complains if "identifier" elements in OPF package files do
not have "id" attributes. The "id" attribute is not required on
"identifier" elements (see section 2.2.10 of the OPF 2.0 specification), so
it should not complain.

(The "identifier" element which is referenced by the "unique-identifier"
attribute will of course always have an "id" attribute. A check should be
added to make sure that "unique-identifier" actually points to an existing
"identifier" element.)

Original issue reported on code.google.com by [email protected] on 30 Jun 2008 at 7:57

Attachments:

mimetype file content not properly extracted sometimes

(using epubcheck-0.9.2.jar)

epub file: http://www.hxa7241.org/articles/content/EpubGuide-
hxa7241.epub (including correct mimetype file)
was zipped with: http://www.info-zip.org/Zip.html
but produced error:

   EpubGuide-hxa7241.epub: mimetype contains wrong type (application/
epub+zip expected)

The problem: In a zip file, there is an extra field between the file name 
and the file content (it is zero-length only optionally).

To fix:

Considering the zip file as a byte array, then:

   filename starts at [30]
   content starts at [30 + filenameLength + extrafieldLength]

   filenameLength is ([27] << 8) | [26]
   extrafieldLength is ([29] << 8) | [28]
   contentLength is ([21] << 24) | ([20] << 16) | ([19] << 8) | [18]

So, summarising comments for possible code would be (separating 
deserializing from checking):

   // read checkable values (filename, filecontent)
      // open file stream

      // read some header values
         // read file content length
            // seek to 18, read 4 (low bytes first)
         // read filename length
            // seek +4, read 2 (low bytes first)
         // read extrafield length
            // read 2 (low bytes first)

      // read checkable values
         // read filename
            // read filenameLength bytes
         // read filecontent (maybe not all)
            // seek +extrafieldLength, read filecontentLength bytes

   // check values
      // check filename
         // make string from filename bytes
         // compare with "mimetype"
      // check filecontent
         // make string from filecontent bytes
         // compare with "application/epub+zip"

But, probably it would be better to use java.util.zip.ZipFile...

Original issue reported on code.google.com by [email protected] on 28 Dec 2007 at 12:35

encryption.xml of content protected epub

PROBLEM:

We are using encryption.xml for content protection for embedded fonts in
ePub packages as described in
http://www.adobe.com/devnet/digitalpublishing/pdfs/content_protection.pdf,
the encryption.xml file generates two errors by epubcheck-1.0.4 


METHOD:

Checking epub package with content protection (encryption.xml)


RESULT:

Two errors generated:
1. ERROR: files\test.epub/META-INF/encryption.xml(2): attribute
"compression" from namespace "http:/ns.
adobe.com/digitaleditions/enc" not allowed at this point; ignored

2. ERROR: files\test.epub/META-INF/encryption.xml(5): unfinished element

EXPECTED:

If it's a bug, plz. fix it to support content protected epub checking, or
tell me how can i fix my file if it is my fault.

PLATFORM:

epubcheck-1.0.4
Windows-XP

ADDITIONAL INFO:

Sample file attached (test.epub), Kindly download and check it.


Thanks..

Wael Abdelsattar
Production Developer
Hindawi Publishing Corporation
[email protected]
http://www.hindawi.com/


Original issue reported on code.google.com by [email protected] on 12 Apr 2009 at 10:12

Attachments:

ant complains about missing build dir

${build.dir} is defined as ${epubcheck.base.dir}/bin.

The target 'removeClasses' tries to delete ${build.dir}/org and fails with
the error:

BUILD FAILED
epubcheck/com.adobe.epubcheck/build.xml:38: Directory does not
exist:epubcheck/com.adobe.epubcheck/bin

I'm using Apache Ant version 1.7.0

I've never used ant before, so I'm not sure where the best place for the
fix is, but putting '<mkdir dir="${build.dir}"/>' right after the
definition of the ${build.dir} property seems to work.

Original issue reported on code.google.com by [email protected] on 9 Sep 2008 at 1:20

Not checking well-formedness of xml files

PROBLEM:

The software is not checking for well-formedness for all the XML files 
included in the epub package

METHOD:

What steps will reproduce the problem?
1. In the attached epub package, page-map.xml is not well-fromed.
2.
3.

RESULT:

The epub checker is not showing any error.

EXPECTED:

It should raise errors if the XML files are not inlcluded are not well-
formed and not validated.

PLATFORM:

I am using jar file of version 0.92 on WinXP

ADDITIONAL INFO:

As per the OPF specifications page-map attribute is not accepted. But as 
per Adobe epub best practcies document we can use this.

Original issue reported on code.google.com by [email protected] on 14 Apr 2008 at 8:44

Attachments:

warn when ncx file has the wrong mime-type in the OPF

The correct mime-type for ncx files is 'application/x-dtbncx+xml'.

When an opf file specifies the ncx's mime-type as anything else, a warning
should be given.

Quoting from the spec:
http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.4.1.2

"Like all other Publication components, the NCX must be included as an item
in the manifest (with media-type of application/x-dtbncx+xml)."

Original issue reported on code.google.com by [email protected] on 11 Sep 2008 at 8:11

java.net.MalformedURLException: no protocol:

PROBLEM:

When running epubcheck in an environment that contains other instances of
com.thaiopensource.validate.nrl on the classpath, a MalformedURLException
is thrown. 

METHOD:
1. Add the original jing.jar or onvdl.jar to the classpath
2. Run EpubCheck on a pub containing XHTML content docs.
3. Depending on which of the com.thaiopensource.validate.nrl instances
takes precedence it will either work or break (precedence is arbitrary, up
to the JRE). (At least I think this is what happens; it may be due to the
changes made to the nrl packages in the epubcheck-local jing?)

RESULT: Stacktrace below (see reference to rng/ops20.nrl further down)

java.net.MalformedURLException: no protocol: /rng/content-xhtml.rng
    at java.net.URL.<init>(URL.java:567)
    at java.net.URL.<init>(URL.java:464)
    at java.net.URL.<init>(URL.java:413)
    at com.thaiopensource.validate.auto.AutoSchemaReader.createSchema(Unknown
Source)
    at
com.thaiopensource.validate.nrl.SchemaReceiverImpl.createChildSchema(Unknown
Source)
    at
com.thaiopensource.validate.nrl.SchemaImpl$Handler.createSubSchema(Unknown
Source)
    at
com.thaiopensource.validate.nrl.SchemaImpl$Handler.finishValidate(Unknown
Source)
    at com.thaiopensource.validate.nrl.SchemaImpl$Handler.endElement(Unknown
Source)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
    at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.
dispatch(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at com.thaiopensource.validate.auto.AutoSchemaReader.createSchema(Unknown
Source)
    at com.adobe.epubcheck.xml.XMLValidator.<init>(XMLValidator.java:128)
    at com.adobe.epubcheck.ops.OPSChecker.<clinit>(OPSChecker.java:46)
    at
com.adobe.epubcheck.ops.OPSCheckerFactory.newInstance(OPSCheckerFactory.java:36)
    at com.adobe.epubcheck.opf.OPFChecker.checkItemContent(OPFChecker.java:187)
    at com.adobe.epubcheck.opf.OPFChecker.runChecks(OPFChecker.java:103)
    at com.adobe.epubcheck.ocf.OCFChecker.runChecks(OCFChecker.java:60)
    at com.adobe.epubcheck.api.EpubCheck.validate(EpubCheck.java:119)
    at
org.daisy.util.fileset.validation.ValidatorImplEpubCheck.validate(ValidatorImplE
pubCheck.java:60)
    at
org.daisy.util.fileset.validation.ValidatorImplEpubCheck.validate(ValidatorImplE
pubCheck.java:41)
    at int_daisy_validator.ValidatorDriver.execute(ValidatorDriver.java:232)
    at
org.daisy.pipeline.core.transformer.Transformer.executeWrapper(Transformer.java:
172)
    at
org.daisy.pipeline.core.transformer.TransformerHandler.run(TransformerHandler.ja
va:280)
    at org.daisy.pipeline.core.script.Runner.execute(Runner.java:86)
    at org.daisy.pipeline.core.DMFCCore.execute(DMFCCore.java:270)
    at org.daisy.pipeline.ui.CommandLineUI.main(CommandLineUI.java:214)
    at
org.daisy.pipeline.test.PipelineTestDriver.<init>(PipelineTestDriver.java:112)
    at
org.daisy.pipeline.test.PipelineTestDriver.main(PipelineTestDriver.java:175)
Exception in thread "main" java.lang.Error: Internal error:
java.net.MalformedURLException: no protocol: /rng/content-xhtml.rng
rng/ops20.nrl
    at com.adobe.epubcheck.xml.XMLValidator.<init>(XMLValidator.java:134)
    at com.adobe.epubcheck.ops.OPSChecker.<clinit>(OPSChecker.java:46)
    at
com.adobe.epubcheck.ops.OPSCheckerFactory.newInstance(OPSCheckerFactory.java:36)
    at com.adobe.epubcheck.opf.OPFChecker.checkItemContent(OPFChecker.java:187)
    at com.adobe.epubcheck.opf.OPFChecker.runChecks(OPFChecker.java:103)
    at com.adobe.epubcheck.ocf.OCFChecker.runChecks(OCFChecker.java:60)
    at com.adobe.epubcheck.api.EpubCheck.validate(EpubCheck.java:119)
    at
org.daisy.util.fileset.validation.ValidatorImplEpubCheck.validate(ValidatorImplE
pubCheck.java:60)
    at
org.daisy.util.fileset.validation.ValidatorImplEpubCheck.validate(ValidatorImplE
pubCheck.java:41)
    at int_daisy_validator.ValidatorDriver.execute(ValidatorDriver.java:232)
    at
org.daisy.pipeline.core.transformer.Transformer.executeWrapper(Transformer.java:
172)
    at
org.daisy.pipeline.core.transformer.TransformerHandler.run(TransformerHandler.ja
va:280)
    at org.daisy.pipeline.core.script.Runner.execute(Runner.java:86)
    at org.daisy.pipeline.core.DMFCCore.execute(DMFCCore.java:270)
    at org.daisy.pipeline.ui.CommandLineUI.main(CommandLineUI.java:214)
    at
org.daisy.pipeline.test.PipelineTestDriver.<init>(PipelineTestDriver.java:112)
    at
org.daisy.pipeline.test.PipelineTestDriver.main(PipelineTestDriver.java:175)

Original issue reported on code.google.com by [email protected] on 23 Jan 2008 at 11:49

CSS defined in XHTML content files but not in OPF manifest is not flagged

PROBLEM:

ePubs are reported as valid when they include XHTML content files with CSS
declarations yet do not declare those in the manifest. This should be a
warning at least, that compliant rendering agents _must not_ render the
undeclared CSS.

METHOD:

What steps will reproduce the problem?
1. Create an XHTML content file with <link rel="stylesheet" type="text/css"
href="stylesheet.css"/> in the <head>

2. Create a matching "stylesheet.css"
3. Build an epub which is valid other than NOT declaring the stylesheet.css

RESULT:

The epub will be erroneously reported as valid.

EXPECTED:

The epub will be reported as not valid, or at least a warning will be
issued that this CSS MUST NOT be rendered by agents.

PLATFORM:

epubcheck 1.0.3, Linux


Original issue reported on code.google.com by [email protected] on 20 Mar 2009 at 2:29

does not accept windows redirect commands

PROBLEM:

If the program is ran from the Windows command line, the output cannot be
re-directed to a text file.

METHOD:

What steps will reproduce the problem?
1. Run the program from the command line and add the redirect symbol and
the name of the file to re-direct output to.
   Sample code: "java -jar epubcheck.jar file.epub > results.txt"
2. Press Enter

RESULT:

The output is displayed on screen, and the output file is created, but empty.

EXPECTED:

The output of the program that normally displays on screen should be inside
the output text file.

PLATFORM:

epubcheck RC 1

OS: Windows XP Service Pack 2

ADDITIONAL INFO:

The results are the same if ran from a Windows batch file.
A sample batch file is attached.


Original issue reported on code.google.com by [email protected] on 7 Aug 2008 at 6:27

Attachments:

Existence of files referenced in guide not checked

ePubCheck does not check to see if files identified by the href attribute
in reference (inside the guide) exist.

From my little test file:

<guide>
<!--the href here doesn't exist-->
<reference type="toc" title="Table of Contents" href="toc.html"/>
<!--the href here doesn't exist either-->
<reference type="cover" title="Cover Image" href="cover.html"/>
</guide>

Files with those names don't exist in my ePub, but I get no errors.

This is of more than academic interest, as the mobigen program Amazon uses
to create Kindle files from ePub uses this to identify the table of contents.

I'm attaching a small test file, which also contains examples of issues 42
and 43.

Dave


Original issue reported on code.google.com by [email protected] on 18 Sep 2009 at 3:03

Attachments:

optional ncx attributes treated as required

(using epubcheck-0.9.2.jar)

A ncx file with element 'ncx' containing attributes 'xmlns' and 
'version' (epub file: http://www.hxa7241.org/articles/content/EpubGuide-
hxa7241.epub) produces the error:

   EpubGuide-hxa7241.epub/toc.ncx(4): required attributes missing

(The relevant DTD -- http://www.daisy.org/z3986/2005/ncx-2005-1.dtd 
-- sets other attributes (lang, dir) as implied.)

To fix:

In rng/ncx.rng, <attribute name="lang" ...> should be enclosed in 
<optional>...</optional>

And (in element 'ncx') optional attribute 'dir' with value range (ltr|rtl) 
should be added.

(well, that seems right...)

Original issue reported on code.google.com by [email protected] on 28 Dec 2007 at 12:39

Reports error when no key given in encryption.xml

PROBLEM:
When encrypting fonts using the IDPF approved method (or the Adobe method), 
epubcheck will 
give an error on an unfinished element in encryption.xml. There's also a an 
error given about a 
compression attribute for the adobe encruption, but I don't know whether that's 
valid or not.

METHOD:

What steps will reproduce the problem?
1. Encrypt an ePub using the IDPF method
2. Run epubcheck on the ePub

RESULT:
What happens?
ERROR: 
/Users/pdurrant/Documents/Publishing/Desbarollda/ebook/Desbarollda_encrypt.epub/
META-
INF/encryption.xml(5): unfinished element
ERROR: 
/Users/pdurrant/Documents/Publishing/Desbarollda/ebook/Desbarollda_encrypt.epub/
META-
INF/encryption.xml(11): unfinished element
WARNING: 
/Users/pdurrant/Documents/Publishing/Desbarollda/ebook/Desbarollda_encrypt.epub/
OEBPS/c
ontent.opf(76)Fonts/BaskervilleMTStd-Regular.otf is an encrypted non-required 
entry! 
Epubcheck will not validate Fonts/BaskervilleMTStd-Regular.otf
WARNING: 
/Users/pdurrant/Documents/Publishing/Desbarollda/ebook/Desbarollda_encrypt.epub/
OEBPS/c
ontent.opf(77)Fonts/BaskervilleMTStd-Italic.otf is an encrypted non-required 
entry! Epubcheck 
will not validate Fonts/BaskervilleMTStd-Italic.otf

Check finished with warnings or errors!


EXPECTED:

What did you expect to happen? It is very important to state what your 
expectation is.
I'd expect at most to see the warnings about the fonts not being checked.

PLATFORM:

What version of the product are you using? On what operating system?
1.0.4 on Mac OS X 10.5.8

ADDITIONAL INFO:

Please provide any additional information below.
IDPF font encryption doesn't seem to be supported by any ePub reader I've come 
across. When 
encoding with the adobe method, I have had success with ADE, so I think my 
encoding methods 
are correct.


Original issue reported on code.google.com by [email protected] on 20 Sep 2009 at 8:00

I/O Error

PROBLEM:

While executing the epub validation tool version epubcheck-1.0.4.jar, i 
found the below error. Epub is not getting validated successfully.

METHOD:

What steps will reproduce the problem?
1. Run epub validation

RESULT:

Error: 9781842557358_Legend.epub: I/O error reading 
OEBPS/john_9781842557358_oeb_cop_r1.html.

EXPECTED:

Nill error in epub validation

PLATFORM:

Windows 2000


Original issue reported on code.google.com by [email protected] on 22 Oct 2009 at 8:45

Attachments:

Exception thrown when opf item has no media-type attribute

PROBLEM:

Given an OPF file that has an <item> without a media-type attribute, the
following exception is thrown:

Exception in thread "main" java.lang.NullPointerException
    at com.adobe.epubcheck.opf.OPFChecker.isBlessedItemType(OPFChecker.java:125)
    at com.adobe.epubcheck.opf.XRefChecker.checkReference(XRefChecker.java:190)
    at com.adobe.epubcheck.opf.XRefChecker.checkReferences(XRefChecker.java:163)
    at com.adobe.epubcheck.opf.OPFChecker.runChecks(OPFChecker.java:120)
    at com.adobe.epubcheck.ocf.OCFChecker.runChecks(OCFChecker.java:60)
    at com.adobe.epubcheck.api.EpubCheck.validate(EpubCheck.java:119)
    at com.adobe.epubcheck.tool.Checker.main(Checker.java:47)

METHOD:

What steps will reproduce the problem?
1. Take a valid ePub file. For example, from feedbooks.
2. Delete the media-type attribute from one of the <item>s in the OPF file.
3. Run epubcheck on the modified ePub.
4. Exception thrown

EXPECTED:

A real error should be printed, such as:
'path/to/file.opf(15): item element missing media-type attribute.'

PLATFORM:

I'm using the 1.0.0 JAR downloaded from the website.

Original issue reported on code.google.com by [email protected] on 9 Sep 2008 at 4:00

Validator does not ensure that identified id is unique


The following opf file passes the validator, but it should fail since there
are multiple identifiers with the "dcid" id.

<opf:package version="2.0" unique-identifier="dcid"
xmlns:opf="http://www.idpf.org/2007/opf"
xmlns:dc="http://purl.org/dc/elements/1.1/">
  <opf:metadata>
    <dc:identifier id="dcid"
opf:scheme="UUID">urn:uuid:ea5b8a7d-7d36-42e9-bd04-626ac017ce08</dc:identifier>
    <dc:identifier id="dcid" opf:scheme="ISBN">123456789X</dc:identifier>
 ....
</opf:package>

Original issue reported on code.google.com by [email protected] on 28 Mar 2008 at 12:48

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.