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.
.jar
java -jar epubcheck-x.x.x.jar file.epub
Does anyone associated with the project want to publish this to the central Maven repository, or should I just do this myself?
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
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.
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?