w3c / epubcheck Goto Github PK
View Code? Open in Web Editor NEWThe conformance checker for EPUB publications
Home Page: https://www.w3.org/publishing/epubcheck/
License: BSD 3-Clause "New" or "Revised" License
The conformance checker for EPUB publications
Home Page: https://www.w3.org/publishing/epubcheck/
License: BSD 3-Clause "New" or "Revised" License
From [email protected] on September 15, 2009 18:00:24
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: http://code.google.com/p/epubcheck/issues/detail?id=43
From [email protected] on December 21, 2007 04:30:10
using verion 9.2,
input <br/ > produces error: "attribute "clear" not allowed at this point;
ignored"
which is a little confusing.
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=1
From [email protected] on September 20, 2009 10:00:35
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: http://code.google.com/p/epubcheck/issues/detail?id=46
From [email protected] on September 11, 2008 22:11:52
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: http://code.google.com/p/epubcheck/issues/detail?id=21
From jens.quade on January 04, 2009 15:24:01
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">
<sch:rule context="ncx:ncx">
<sch:assert test="count(//*[@playOrder='1'])=1">
first playOrder value is not 1
/sch:assert
/sch:rule
/sch:pattern
Attachment: Test-ncx-playOrder1.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=27
From [email protected] on December 28, 2007 13:35:44
(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: http://code.google.com/p/epubcheck/issues/detail?id=2
From [email protected] on April 12, 2009 12:12:46
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:
Thanks..
Wael Abdelsattar
Production Developer
Hindawi Publishing Corporation
[email protected] http://www.hindawi.com/
Attachment: test.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=32
From [email protected] on September 18, 2009 05:03:22
ePubCheck does not check to see if files identified by the href attribute
in reference (inside the guide) exist.
From my little test file:
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
Attachment: ePubTest.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=45
From [email protected] on November 09, 2009 18:40:41
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-and-fallbacks/ The test document is attached.
Attachment: math.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=50
From [email protected] on September 15, 2009 17:58:15
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: http://code.google.com/p/epubcheck/issues/detail?id=42
From [email protected] on August 07, 2008 20:27:03
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.
Attachment: epubcheck.bat
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=17
From [email protected] on September 09, 2009 13:07:55
By default, ZIP implementations add extra metadata, which cause the content
of "mimetype" at a different offset.
The attached version of EpubCheck adds diagnostics for that case.
Attachment: EpubCheck.java
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=40
From [email protected] on September 09, 2008 15:20:54
${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 '' right after the
definition of the ${build.dir} property seems to work.
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=19
From [email protected] on October 22, 2009 10:43:54
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: http://code.google.com/p/epubcheck/issues/detail?id=48
From [email protected] on March 27, 2008 18:12:21
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: http://code.google.com/p/epubcheck/issues/detail?id=8
From [email protected] on May 15, 2009 01:23:23
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.
Attachment: invalid-iso88591.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=34
From [email protected] on June 25, 2009 05:12:51
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: http://code.google.com/p/epubcheck/issues/detail?id=36
From [email protected] on November 16, 2008 01:02:44
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
Attachment: sherlock_notoc.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=25
From [email protected] on February 24, 2008 03:05:49
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: http://code.google.com/p/epubcheck/issues/detail?id=6
From [email protected] on April 12, 2009 10:18:01
PROBLEM: We are "Hindawi Publishing Corporation" using "xhtml-math-svg-flat.dtd" by
the following Doctype:
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: http://code.google.com/p/epubcheck/issues/detail?id=31
From [email protected] on November 16, 2008 01:09:02
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
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.
Attachment: sherlock_nospine.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=26
From [email protected] on September 16, 2009 12:29:51
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: http://code.google.com/p/epubcheck/issues/detail?id=44
From [email protected] on November 10, 2008 09:33:02
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 tag in the spec. PLATFORM: epubcheck 1.0.2 ADDITIONAL INFO: Please see attached patch that brings the schema up to spec.
Attachment: opf20.patch
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=24
From [email protected] on June 30, 2008 21:57:22
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.)
Attachment: id.patch
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=13
From [email protected] on December 28, 2007 13:39:35
(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
...
And (in element 'ncx') optional attribute 'dir' with value range (ltr|rtl)
should be added.
(well, that seems right...)
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=3
From [email protected] on March 28, 2008 01:48:03
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: http://code.google.com/p/epubcheck/issues/detail?id=9
From [email protected] on September 09, 2009 11:51:48
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
Attachment: OCFPackage.java
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=39
From [email protected] on May 30, 2008 18:20:33
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 irc://irc.f EXPECTED: No errors
See attached patch against http://epubcheck.googlecode.com/svn/trunk/com.adobe.epubcheck/src/com/adobe/epubcheck/ops/OPSHandler.java
Attachment: irc_support.patch
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=11
From [email protected] on June 30, 2008 22:02:02
epubcheck 0.9.5 complains if dtbook documents have "a" elements with "href"
attributes containing fragment identifiers, saying that the fragment
identifiers are not defined, even when they are.
Attachment: dtbook-fi.patch
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=14
From [email protected] on March 07, 2008 19:02:39
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
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
Attachment: svg.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=7
From [email protected] on September 09, 2008 18:00:49
PROBLEM: Given an OPF file that has an 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 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: http://code.google.com/p/epubcheck/issues/detail?id=20
From [email protected] on April 02, 2009 16:12:40
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):
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/4S0cRXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUA
AAABAAAAYgEbAAUAAAABAAAAagEoAAMAAAABAAIAAAExAAIAAAAbAAAAcgEyAAIAAAAUAAAAjYdmyZ9vUtHtHL9
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: http://code.google.com/p/epubcheck/issues/detail?id=30
From [email protected] on March 20, 2009 03:32:39
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? and 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: http://code.google.com/p/epubcheck/issues/detail?id=29
From [email protected] on September 09, 2008 15:04:37
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: http://code.google.com/p/epubcheck/issues/detail?id=18
From [email protected] on January 24, 2008 00:49:34
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.(URL.java:567)
at java.net.URL.(URL.java:464)
at java.net.URL.(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.(XMLValidator.java:128)
at com.adobe.epubcheck.ops.OPSChecker.(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(ValidatorImplEpubCheck.java:60)
at
org.daisy.util.fileset.validation.ValidatorImplEpubCheck.validate(ValidatorImplEpubCheck.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.java: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.(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.(XMLValidator.java:134)
at com.adobe.epubcheck.ops.OPSChecker.(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(ValidatorImplEpubCheck.java:60)
at
org.daisy.util.fileset.validation.ValidatorImplEpubCheck.validate(ValidatorImplEpubCheck.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.java: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.(PipelineTestDriver.java:112)
at
org.daisy.pipeline.test.PipelineTestDriver.main(PipelineTestDriver.java:175)
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=5
From [email protected] on June 11, 2009 11:32:12
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:
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.(DatatypeLibraryLoader.java:173)
at
org.relaxng.datatype.helpers.DatatypeLibraryLoader.(DatatypeLibraryLoader.java:57)
at
com.thaiopensource.relaxng.impl.SchemaReceiverImpl.installHandlers(SchemaReceiverImpl.java:36)
at
com.thaiopensource.validate.auto.AutoSchemaReceiver$Handler.startElement(AutoSchemaReceiver.java:54)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(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$FragmentContentDriver.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(XMLDocumentScannerImpl.java:648)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.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(AbstractSAXParser.java:1205)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at
com.thaiopensource.validate.auto.AutoSchemaReader.createSchema(AutoSchemaReader.java:68)
at com.adobe.epubcheck.xml.XMLValidator.(XMLValidator.java:128)
at com.adobe.epubcheck.ocf.OCFChecker.(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)
Attachment: donQuixote.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=35
From [email protected] on August 20, 2009 21:59:14
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.
Attachment: in_ncx_not_in_spine.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=37
From [email protected] on June 19, 2008 22:20:21
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"/>
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...
Attachment: 15675-h.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=12
From [email protected] on October 22, 2009 10:45:53
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
Attachment: 9781842557358_Legend.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=49
From [email protected] on January 13, 2008 22:26:33
Trying to validate documents with invalid DTDs does not generate an
error to that effect. [see issue 1 ]
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=4
From [email protected] on April 14, 2008 10:44:54
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.
Attachment: 9789025410834.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=10
From [email protected] on May 06, 2009 20:44:25
PROBLEM: For easier usage it would be good to include two scripts for starting
epubcheck.
SOLUTION:
For Linux:
//epubcheck(.sh)
java -jar epubcheck-x.x.x.jar $1
//*
For Windows:
//epubcheck.bat
java -jar epubcheck-x.x.x.jar %1
//* PLATFORM: Linux,Windows
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=33
From [email protected] on July 05, 2008 21:01:28
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
: bad continuation of multi-byte UTF-8 sequence (code: 0xffffffe1)
: 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.
: is encrypted according to META-INF/encryption.xml
: 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: http://code.google.com/p/epubcheck/issues/detail?id=16
From [email protected] on September 26, 2008 07:30:14
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 , there's a element, before the .
epubcheck expects right after , therefore, giving error EXPECTED: Inside , 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: http://code.google.com/p/epubcheck/issues/detail?id=22
From [email protected] on October 16, 2009 20:19:45
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.
Attachment: With God in Russia - Ciszek_ Fr. Walter.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=47
From [email protected] on September 01, 2009 20:07:10
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: http://code.google.com/p/epubcheck/issues/detail?id=38
From [email protected] on September 15, 2009 03:46:16
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
Attachment: Barrie-PeterPan-10pages.epub
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=41
From [email protected] on October 07, 2008 12:45:48
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: http://code.google.com/p/epubcheck/issues/detail?id=23
From [email protected] on March 20, 2009 03:29:13
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 in the
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=28
From [email protected] on June 30, 2008 22:09:35
epubcheck 0.9.5 complains if dtbook documents have "a" elements with "href"
attributes containing URIs pointing to external resources. They should be
allowed to contain such URIs, at least when the "external" attribute is "true".
Attachment: dtbook-1.patch dtbook-2.patch
Original issue: http://code.google.com/p/epubcheck/issues/detail?id=15
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.