In Saxon's s9api interface the root API object is the net.sf.saxon.s9api.Processor
object. This again
is a wrapper around a Configuration
.
All the configuration properties are exposed via the Processor
methods getConfigurationProperty(name)
and setConfigurationProperty(name, value)
which map
directly to the same methods on the underlying Configuration
.
The s9api Processor
object also has a constructor new Processor(source)
which allows
the underlying Configuration
to be built from a supplied configuration file. The argument is a
org.xml.sax.Source
object, for example a StreamSource
, which identifies the configuration
file, which must have the format described in
Configuration file. Configuration files are
available only in Saxon-PE and Saxon-EE.
In many cases with s9api it is more appropriate to set options at a finer level of granularity than the Processor
.
For example, options that affect XSLT stylesheet compilation can be set on the XsltCompiler
object, and options that
affect XQuery compilation on the XQueryCompiler
.