<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="configuration" page="config-interfaces" subpage="s9api-config"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Configuration using s9api</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: Configuration using s9api"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Configuration using s9api</h1>
      <p>In Saxon's s9api interface the root API object is the <a class="bodylink" href="../../javadoc/net/sf/saxon/s9api/Processor.html"><code>net.sf.saxon.s9api.Processor</code></a> object. This again
          is a wrapper around a <a class="bodylink" href="../../javadoc/net/sf/saxon/Configuration.html"><code>Configuration</code></a>. 
            All the configuration properties are exposed via the <code>Processor</code>
          methods <code>getConfigurationProperty(name)</code> and <code>setConfigurationProperty(name, value)</code> which map
directly to the same methods on the underlying <code>Configuration</code>.</p>
      <p>The s9api <code>Processor</code> object also has a constructor <code>new Processor(source)</code> which allows
         the underlying <code>Configuration</code> to be built from a supplied configuration file. The argument is a
         <code>org.xml.sax.Source</code> object, for example a <code>StreamSource</code>, which identifies the configuration
            file, which must have the format described in
            <a class="bodylink" href="../../configuration/configuration-file.xml">Configuration file</a>.</p>
      <p>In many cases with s9api it is more appropriate to set options at a finer level of granularity than the <code>Processor</code>.
   For example, options that affect XSLT stylesheet compilation can be set on the <a class="bodylink" href="../../javadoc/net/sf/saxon/s9api/XsltCompiler.html"><code>XsltCompiler</code></a> object, and options that
   affect XQuery compilation on the <a class="bodylink" href="../../javadoc/net/sf/saxon/s9api/XQueryCompiler.html"><code>XQueryCompiler</code></a>. 
   Some more specialized configuration options are not exposed directly
by these two classes, but can be tailored by accessing the underlying support objects: 
   <a class="bodylink" href="../../javadoc/net/sf/saxon/trans/CompilerInfo.html"><code>CompilerInfo</code></a> in the case of XSLT, and
<a class="bodylink"
            href="../../javadoc/net/sf/saxon/query/StaticQueryContext.html"><code>StaticQueryContext</code></a> in the case of XQuery.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="config-dotnet.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>