Saxon offers three different APIs allowing queries to be run from Java:
The XQJ interface is an implementation of the current draft of the proposed XQuery API for Java (XQJ) interface defined in JSR-225
The s9api interface is a newly designed interface allowing integrated access to all Saxon's XML processing capabilities in a uniform way, taking advantage of the type safety offered by generics in Java 5
There is also a legacy interface retained from previous Saxon releases, which will be appropriate if you are using JDK 1.4, or if you need access to lower-level Saxon internals.
Links