<?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="config-ant"/>
      <!--
           Generated at 2010-10-29T18:20:48.427+01:00--><title>Saxonica: XSLT and XQuery Processing: Configuration when running Ant</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: Configuration when running Ant"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Configuration when running Ant</h1>
      <p>It is possible to run XSLT transformations from Ant using the <code>xslt</code> task, selecting Saxon as the XSLT
         processor by setting the <code>factory</code> child element to the Saxon implementation class of <code>javax.xml.transform.TransformerFactory</code>,
         that is one of <a class="bodylink" href="../../javadoc/net/sf/saxon/TransformerFactory.html"><code>net.sf.saxon.TransformerFactory</code></a>, 
            <a class="bodylink"
            href="../../javadoc/com/saxonica/config/ProfessionalTransformerFactory.html"><code>com.saxonica.config.ProfessionalTransformerFactory</code></a>,
         or <a class="bodylink"
            href="../../javadoc/com/saxonica/config/EnterpriseTransformerFactory.html"><code>com.saxonica.config.EnterpriseTransformerFactory</code></a> depending on the Saxon edition in use.</p>
      <p>Additional configuration options can be specified using the <code>attribute</code> child of the <code>factory</code>
         element: for example the following task was used as part of the pipeline for publishing this documentation:</p>
      <div class="codeblock"
           style="border: solid thin; background-color: #B1CCC7; padding: 2px">
         <pre>
            <code>
      &lt;xslt in="${userdoc.dir}/src/function-data.xml"
            style="${userdoc.dir}/style/preprocess-functions.xsl"
            out="${userdoc.dir}/src/functions.xml"
            classpath="e:\saxon\eej\saxon9ee.jar;e:\saxon\eej\saxon-licenses"&gt;
            &lt;factory name="com.saxonica.config.EnterpriseTransformerFactory"&gt;
                &lt;attribute name="http://saxon.sf.net/feature/xsltSchemaAware" value="true"/&gt;
                &lt;attribute name="http://saxon.sf.net/feature/schema-validation-mode" value="strict"/&gt;
                &lt;attribute name="http://saxon.sf.net/feature/xsd-version" value="1.1"/&gt;
            &lt;/factory&gt;
      &lt;/xslt&gt;
         </code>
         </pre>
      </div>
      <p>Many of the options available as configuration parameters (for example <a class="bodylink"
            href="../../javadoc/net/sf/saxon/lib/FeatureKeys.html#XSLT_INITIAL_TEMPLATE"><code>FeatureKeys.XSLT_INITIAL_TEMPLATE)</code></a>
            were provided explicitly with Ant in mind. The provision of these parameters makes the customized version of the Ant
            XSLT task provided with some earlier Saxon versions redundant, and the customized task is no longer supported.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="../configuration-file.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>