My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Library  
Updated Feb 4, 2010 by soroto...@gmail.com

Using EpubCheck as a library

You can use EpubCheck as a library in your Java application. EpubCheck public interfaces can be found in com.adobe.epubcheck.api package. EpubCheck class can be used to instantiate a validation engine. Use one of its constructors and then call validate() method. Report is an interface that you can implement to get a list of the errors and warnings reported by the validation engine (instead of the error list being printed out).

Regular .jar download contains all you need to use EpubCheck as a library.

Comment by devrohil...@gmail.com, Jul 28, 2009

.jar

Comment by rebeccac...@gmail.com, Mar 30, 2010

java -jar epubcheck-x.x.x.jar file.epub

Comment by tdog.obr...@gmail.com, May 31, 2010

Does anyone associated with the project want to publish this to the central Maven repository, or should I just do this myself?

Comment by jfort...@gmail.com, Feb 10, 2011

Running the epubcheck.jar file itself works fine, but when it is included as a library, I get:

Your configuration does not support XML 1.1 parsing

Are you using off-the-shelf saxon.jar? It contains file named META-INF/services/javax.xml.parsers.SAXParserFactory This interferes with Java default XML-1.1-compliant parser. Either remove that file from saxon.jar or define javax.xml.parsers.SAXParserFactory system property to point to XML-1.1-compliant parser.

Nothing has changed except that I am running the contents of Checker.java main() in a verify function of my own class. I cannot find a reference to javax.xml.parsers.SAXParserFactory in the Build Path. I have explicitly included the saxon.jar that came with epubcheck but that made no difference.

To top it off, the epubcheck runs fine despite the warning.

Comment by r.battis...@gmail.com, Jun 8, 2011

I use the epubcheck JAR as a lib in my project, but your saxon.jar raises exception when I include a newer saxonHE.jar lib. I see that your version of saxon.jar is very very old. Why this?

I need to use a newer version of saxon.

And Do why you have put the saxon.jar into the sub dir ./lib respect to the epubcheck.jar?


Sign in to add a comment
Powered by Google Project Hosting