blob: 14e60c4d5a6a42bd6bdba157d54d264d6379f411 [file] [log] [blame]
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "../../style/dtd/document.dtd">
<!--
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<s1 title="&xslt4c; Command-Line Utilities">
<ul>
<li><link anchor="use">Using a command-line utility</link></li>
<li><link anchor="xalanexe">Using the Xalan executable</link></li>
<!--
<li><link anchor="confexe">Using the conf utility</link></li>
-->
</ul><anchor name="use"/>
<s2 title="Using a command-line utility">
<p>To perform a transformation, you can call &xslt4c; from the command line (or script),
or from within an application (see <link idref="usagepatterns">Usage Patterns</link>).</p>
<p>To perform a transformation from the command line or a script, do the following:</p>
<ol>
<li><link idref="download">Download &xslt4c;</link>.<br/><br/></li>
<li><link idref="install">Set the path/library path</link> to include the Xalan executable and the Xalan and Xerces
libraries.<br/><br/></li>
<li>Call the Xalan executable with the appropriate flags and arguments (described below).</li>
</ol>
</s2>
<anchor name="xalanexe"/>
<s2 title="Using the Xalan executable">
<p>Call the Xalan executable as follows:<br/><br/>
<code>Xalan <ref>[options]</ref> <ref>xmlSource</ref> <ref>xslStylesheet</ref></code><br/><br/>
where <ref>xmlSource</ref> is the XML source document, <ref>xslStylesheet</ref> is the stylesheet to apply, and
<ref>[options]</ref> are any (or none) of the following:</p>
<table>
<tr><th>Option</th><th>Description</th></tr>
<tr><td>-a</td><td>Use stylesheet processing instruction, not the stylesheet argument.</td></tr>
<tr><td>-e encoding</td><td>Force the specified encoding for the output.</td></tr>
<tr><td>-i integer</td><td>Indent the specified amount.</td></tr>
<tr><td>-m</td><td>Omit the META tag in HTML output.</td></tr>
<tr><td>-o filename</td><td>Write transformation result to this file (rather than to the console).</td></tr>
<tr><td>-p name expr</td><td>Set a stylesheet parameter with this expression.</td></tr>
<tr><td>-t name expr</td><td>Display timing information.</td></tr>
<tr><td>-u name expr</td><td>Disable escaping of URLs in HTML output.</td></tr>
<tr><td>-v</td><td>Validate the XML source document.</td></tr>
<tr><td>-</td><td>A dash as the 'source' argument reads from stdin.<br/>A dash as the 'stylesheet' argument reads
from stdin.<br/>('-' cannot be used for both arguments.)</td></tr>
</table>
<p>To display a list of the options call the Xalan executable as follows:</p>
<p><code>Xalan -?</code></p>
</s2>
<!-- Next Release
<anchor name="confexe"/>
<s2 title="Using the conf utility">
<p>The conf utility is a test harness used to run conformance tests found under the xml-xalan/test/tests/conf branch. The conf utility is provided in the bin directory of &xslt4c; UNIX binary distributions and the Build directory of the &xslt4c; Windows binary distribution. If you downloaded the source distribution package, you will need to do the following in order to build the conf utility:</p>
<p>With the Windows source package,</p>
<ol>
<li>Follow the same build instructions as listed under <link idref="readme" anchor="win32">"Steps to Build on Windows"</link> to build the Xalan executable.</li>
<li>From Visual C++, go to "Projects" and select "Set Active Project" and highlight the "conf" project.</li>
<li>Go to "Build" and select "Rebuild All" to build the conf utility.</li>
</ol>
<p>With the UNIX source package,</p>
<ol>
<li>Follow the same build instructions as listed under <link idref="readme" anchor="unix">"Steps to Build on UNIX"</link></li>
<li>Run the build with the make target as "Tests".</li>
</ol>
<p>If you downloaded the binary distribution, the conf utility is located in the bin directory. </p>
<p>Call the conf utility as follows:<br/><br/>
<code>Conf <ref>test_dir</ref> [-sub <ref>&lt;dir&gt;</ref> -out <ref>&lt;dir&gt;</ref> -gold <ref>&lt;dir&gt;</ref> -source (XST | XPL | DOM)]</code><br/><br/>
<table>
<tr><th>Option</th><th>Description</th></tr>
<tr><td><ref>test_dir</ref></td><td>Specifies the base directory for the test cases.</td></tr>
<tr><td>-sub <ref>dir</ref></td><td>Specifies the specific sub-directory for the test cases. By default, the sub-directory assumes the same value specified for the test_dir option.</td></tr>
<tr><td>-out <ref>dir</ref></td><td>Specifies the directory to store the test results output. By default, the output directory is set to CONF-RESULTS.</td></tr>
<tr><td>-gold <ref>dir</ref></td><td>Specifies the directory for the gold files. By default, the gold file directory is set to &lt;test_dir&gt;-gold.</td></tr>
<tr><td>-source <ref>type</ref></td><td>Specifies the type of parsed source. Valid values include: XST (XalanSourceTree), XPL (XercesParserLiaison), or DOM (Document Object Model). By default, this value is set to XST.</td></tr>
</table></p>
<p>To display a list of the options call the conf utility as follows:</p>
<p><code>conf &dash;&dash;help</code></p>
<p>After conformance tests have been run, a results report is generated in HTML format. The results report file name use the following naming convention:<br/><br/>
&nbsp;&nbsp;&nbsp;<code>conf<ref>xxyyzzzz</ref>.html</code>.
<br/><br/>Where<br/><br/>
<table>
<tr><th>Placeholder</th><th>Description</th></tr>
<tr><td>xx</td><td>two digit representation of the current month</td></tr>
<tr><td>yy</td><td>two digit representation of the current day</td></tr>
<tr><td>zzzz</td><td>four digit representation of the current time stamp in military format</td></tr>
</table></p>
</s2>
-->
</s1>