This package contains an implementation of the XQJ specification defined in JSR 225. This API is not yet part of the Java Standard Edition platform, but it is widely supported by a variety of Java-based XQuery engines.

Saxon's implementation of the {@link javax.xml.xquery.XQDataSource} class is {@link net.sf.saxon.xqj.SaxonXQDataSource}. Generally, this is the only class that applications need to access directly (all other access can be done by using standard XQJ interfaces). However, if there is a need to mix XQuery access with other Saxon functionality such as schema processing, then it is often useful to cast the XQJ objects to their underlying Saxon implementation classes, which make additional methods available.

In general it is not possible to mix Saxon implementation classes of the XQJ interface with implementation classes from other vendors. That is, if an interface specifies that a value of an XQJ type must be passed as an argument, Saxon in general requires the value to belong to a Saxon implementation of that interface.

From Saxon 9.6 the XQJ implementation is no longer part of the open-source Saxon-HE product; it remains available in Saxon-PE and Saxon-EE. The change in package name reflects this. The reason for the change is that it has been pointed out that the XQJ interface classes are made available by Oracle under a license that does not meet the accepted criteria for open source software; in particular, the license does not permit the code to be modified. This has caused Saxon to be removed from some open source distributions.

Michael H. Kay
Saxonica Limited
8 October 2013