JAXP Factory Interfaces
Saxon implements a number of JAXP interfaces, notably the APIs for transformation, XPath processing, and validation.
For transformation, the root object of the API is the JAXP
provides three implementations of this interface:
net.sf.saxon.TransformerFactoryImpl for Saxon-HE,
for Saxon-PE and Saxon-EE respectively. This interface provides methods
which correspond directly to the methods
on the underlying
Configuration object. By casting from the JAXP interface to the Saxon implementation class it is
also possible to call the
getConfiguration method which exposes the
Configuration object directly.
The Saxon-PE and Saxon-EE implementations of the
TransformerFactory also allow the configuration property
FeatureKeys.CONFIGURATION_FILE to be set.
The value is a filename containing the name of a configuration
file, which must have the format described in Configuration file. This causes
any previously-initialized configuration to be discarded, and replaced with a new
built from the settings in the specified configuration file.
XPathFactory interface has a general-purpose configuration mechanism in the form of the two
getFeature(). These can be used to set/get all boolean-valued configuration
options in the underlying Saxon
Configuration, as well as the options defined in the JAXP interface itself. To set
configuration options that are not boolean-valued, it
is necessary to navigate to the underlying
Configuration object and use its native interfaces. Saxon's implementation
class for the
net.sf.saxon.xpath.XPathFactoryImpl, regardless which Saxon edition is in use.
Saxon-EE also implements the JAXP
SchemaFactory in class
The interface offers methods
setProperty(name, value) which map to the underlying
methods in the Saxon
Configuration; again, it is also possible to cast to the Saxon implementation class and call
configuration-setting methods directly.