blob: b749a5d5829ac9dad1f1d94874ec67e2a9571ccd [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>ASF: Download/Build &amp; Dependencies</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="resources/apache-xalan.css" />
</head>
<!--
* 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.
-->
<body>
<div id="title">
<table class="HdrTitle">
<tbody>
<tr>
<th rowspan="2">
<a href="../index.html">
<img alt="Trademark Logo" src="resources/XalanJ-Logo-tm.png" width="190" height="90" />
</a>
</th>
<th text-align="center" width="75%">
<a href="index.html">Xalan XSL Transformer User's Guide</a>
</th>
</tr>
<tr>
<td valign="middle">Download/Build &amp; Dependencies</td>
</tr>
</tbody>
</table>
<table class="HdrButtons" align="center" border="1">
<tbody>
<tr>
<td>
<a href="http://www.apache.org">Apache Foundation</a>
</td>
<td>
<a href="http://xalan.apache.org">Xalan Project</a>
</td>
<td>
<a href="http://xerces.apache.org">Xerces Project</a>
</td>
<td>
<a href="http://www.w3.org/TR">Web Consortium</a>
</td>
<td>
<a href="http://www.oasis-open.org/standards">Oasis Open</a>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navLeft">
<ul>
<li>
<a href="resources.html">Resources</a>
<br />
</li>
<li>
<a href="http://xalan.apache.org/index.html">Home</a>
</li></ul><hr /><ul>
<li>
<a href="index.html">Xalan-J 2.7.3</a>
</li>
<li>
<a href="charter.html">Charter</a>
</li></ul><hr /><ul>
<li>
<a href="whatsnew.html">What's New</a>
</li>
<li>
<a href="readme.html">Release Notes</a>
</li></ul><hr /><ul>
<li>
<a href="overview.html">Overview</a>
</li>
<li>Download/Build<br />
</li>
<li>
<a href="getstarted.html">Getting Started</a>
</li>
<li>
<a href="xsltc_usage.html">Using XSLTC</a>
</li></ul><hr /><ul>
<li>
<a href="faq.html">FAQs</a>
</li></ul><hr /><ul>
<li>
<a href="samples.html">Sample Apps</a>
</li>
<li>
<a href="commandline.html">Command Line</a>
</li></ul><hr /><ul>
<li>
<a href="features.html">Features</a>
</li>
<li>
<a href="trax.html">Transform API</a>
</li>
<li>
<a href="xpath_apis.html">XPath API</a>
</li>
<li>
<a href="usagepatterns.html">Usage Patterns</a>
</li></ul><hr /><ul>
<li>
<a href="apidocs/index.html">Xalan-J API</a>
</li>
<li>
<a href="public_apis.html">Public APIs</a>
</li>
<li>
<a href="dtm.html">DTM</a>
</li></ul><hr /><ul>
<li>
<a href="extensions.html">Extensions</a>
</li>
<li>
<a href="extensionslib.html">Extensions Library</a>
</li>
<li>
<a href="extensions_xsltc.html">XSLTC Exts</a>
</li></ul><hr /><ul>
<li>
<a href="design/design2_0_0.html">Xalan 2 Design</a>
</li>
<li>
<a href="xsltc/index.html">XSLTC Design</a>
</li></ul><hr /><ul>
<li>
<a href="builds.html">Building a release</a>
</li>
<li>
<a href="http://xml.apache.org/xalan-j/test/overview.html">Testing</a>
</li>
<li>
<a href="bugreporting.html">Bug Reporting</a>
</li></ul><hr /><ul>
<li>
<a href="contact_us.html">Contact us</a>
</li>
</ul>
</div>
<div id="content">
<h2>Download/Build &amp; Dependencies</h2>
<ul>
<li>
<a href="#latest-release">Downloading the latest release</a>
</li>
<li>
<a href="#download">Downloading what else you might need</a>
</li>
<li>
<a href="#whereis_xml4j">Where do I get Xerces-Java? </a>
</li>
<li>
<a href="#viewcode">How do I view Xalan code in a browser?</a>
</li>
<li>
<a href="#buildmyself">How do I download the latest development code to build myself?</a>
</li>
<li>
<a href="#using-ant">Using ant</a>
</li>
<li>
<a href="#samples">Rebuilding a sample application</a>
</li>
<li>
<a href="#previous-releases">Where do I download previous releases?</a>
</li>
</ul>
<a name="latest-release"></a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h3>Downloading the latest release</h3>
<p> You can download the pre-built binary distributions from one of the
mirror sites at <a href="http://www.apache.org/dyn/closer.cgi/xalan/xalan-j">xalan-j distribution directory</a>.
</p>
<p>Xalan-J has two processors,
an interpretive one "Xalan Interpretive", and a compiled one "Xalan Compiled (XSLTC)".
The Xalan-J binary distribution contain <code>xml-apis.jar</code> and <code>xercesImpl.jar</code> from
<a href="http://xerces.apache.org/xerces2-j/index.html">Xerces-Java 2.12.2</a>.</p>
<p>The Xalan-J binary distribution, <code>xalan-j_2_7_3-bin.zip</code> or <code>xalan-j_2_7_3-bin.tar.gz</code>,
contains the Xalan Interpretive processor, the Xalan Compiled processor (XSLTC) and the
runtime support packages in a single jar, called <code>xalan.jar</code>.</p>
<p>
We provide two distributions: a binary distribution, and a source distribution.
You can also download a source distribution from one of the same
mirror sites at <a href="http://www.apache.org/dyn/closer.cgi/xalan/xalan-j">xalan-j distribution directory</a>. The difference
is that a binary distribution contains <b>-bin</b> in its name,
whereas a source distribution contain <b>-src</b> in its name.
</p>
<p>To use Xalan-Java, you need the following which are available from
either a binary or source distribution:</p>
<ul>
<li>
<code>xml-apis.jar</code> JAXP APIs</li>
<li>
<code>xercesImpl.jar</code> (or another <a href="usagepatterns.html#plug">XML Parser</a>)</li>
<li>
<code>xalan.jar</code>
</li>
<li>
<code>serializer.jar</code> which are the serializer classes of
Xalan-Java</li>
</ul>
<p>
If you have downloaded a binary distribution, you already have a build
(you have the jars). This is also true for a source distribution, however
if you downloaded a source distribution,
you have the option to use Ant to build Xalan-Java,
including <code>xalan.jar</code>, <code>xsltc.jar</code>, <code>serializer.jar</code>
and other things, see <a href="#using-ant">Using Ant</a> for more
details.
</p>
<a name="download"></a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h3>Downloading what else you might need</h3>
<p>To use Xalan-Java, you need the following:</p>
<ul>
<li>The JDK or JRE 1.8 or above</li>
</ul>
<p>
You can get the JDK or JRE from <a href="https://www.ibm.com/support/pages/java-sdk-downloads">
IBM Java SDK downloads</a> or <a href="https://www.oracle.com/in/java/technologies/downloads/">Oracle Java downloads</a>.
</p>
<p>If you plan to run <a href="extensions.html">XSLT extensions</a>
through extension functions or elements, and you want to implement
that support in languages
other than Java, then you will need an implementation of the Bean Scripting Framework (BSF).
An open source implementation is available for download from Apache. See the
<a href="http://jakarta.apache.org/bsf/index.html">Apache Jakarta
BSF project</a>. If you plan to run XSLT extensions implemented in scripting
languages, you will need <code>bsf.jar</code> and one or more additional files as indicated in
<a href="extensions.html#supported-lang">extensions language requirements</a>.
</p>
<a name="whereis_xml4j"></a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h3>Where do I get Xerces-Java?</h3>
<p>
The Xalan-Java Version 2.7.3 has been tested with Xerces-Java 2.12.2.
</p>
<p>
<b>Important:</b> You may experience unpredictable anomalies
if your Xalan-Java and Xerces-Java builds are not in synch.
If you download an update to Xalan-Java, check the
<a href="readme.html">release notes</a>
to determine which version of Xerces-Java you should use.
</p>
<table class="note">
<tr>
<td class="noteImg">
<img src="resources/note.gif" alt="note" />
</td>
<td class="noteTxt">
You can use Xalan-Java with other XML parsers that implement
the <a href="https://jaxp.java.net/">Java API for XML Processing (JAXP) 1.3</a>.
See <a href="usagepatterns.html#plug">Plugging in the Transformer and XML parser</a>.
</td>
</tr>
</table>
<p>
The Xalan-Java download includes <code>xercesImpl.jar</code> from Xerces-Java 2.12.2. In conjunction with <code>xml-apis.jar</code>,
this is all you need to run Xalan-Java with the Xerces-Java XML parser. You can, however, download the
complete Xerces-Java binary or source distribution from the <a href="http://www.apache.org/dyn/closer.cgi/xerces/j/">xerces-j distribution directory</a>.
If you cannot find Xerces-Java 2.12.2 at that location, have a look at the
<a href="http://archive.apache.org/dist/xml/xerces-j/">Apache archive location for
Xerces Java</a>.
</p>
<table class="note">
<tr>
<td class="noteImg">
<img src="resources/note.gif" alt="note" />
</td>
<td class="noteTxt">
If you plan to use a different XML parser, see <a href="usagepatterns.html#plug">Plugging
in a Transformer and XML parser</a>.
</td>
</tr>
</table>
<a name="viewcode"></a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h3>How do I view Xalan code in a browser?</h3>
<p>
Xalan's codebase files may be viewed on browser at
<a href="https://gitbox.apache.org/repos/asf/xalan-java.git">https://gitbox.apache.org/repos/asf/xalan-java.git</a>.
</p>
<p>
The Xalan git repositories xalan-java (branches 'master', xalan-j_xslt3.0) and xalan-test (branch 'master') are the ones
with the latest development code.<br/><br/>
The details of <a href="https://www.w3.org/Style/XSL/">XSL</a> 3.0 language features supported on xalan-java dev repos's
branch xalan-j_xslt3.0 are available at <a href="xsl3/xalanj_xslt3.0_implementation_status.pdf">XalanJ XSLT 3.0 implementation status</a>.
</p>
<a name="buildmyself"></a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h3>How do I download the latest development code to build myself?</h3>
<p>
If you have downloaded a source distribution, or obtained source code
using git, this section may be of interest to you.
</p>
<p>
If you wish to download Xalan and build it yourself, perhaps because you want to
apply a patch and test it, you will need a git client and anonymous access
to the repository.
Don't worry, everyone has anonymous access.
You can find pre-built binaries of git clients for different operating systems here:
<a href="https://git-scm.com/">https://git-scm.com/</a>.
</p>
<p>
You may use the Xalan-J build scripts, <b>build.bat</b> or <b>build.sh</b> (depending on
your operating system), and use <b>ant</b> and the buildfile <b>build.xml</b> to build Xalan-J. See
the section <a href="#jar">Using ant</a> for more information.
</p>
<p>
Few of the useful Xalan-J build targets are : <code>jar</code>, <code>xsltc.jar</code>, <code>serializer.jar</code>.
If you want to test the jars you just built in the directory <b>xalan-java/build</b>, change to
directory <b>xalan-test</b> and issue following commands:
<blockquote class="source">
<pre>
build jar
build smoketest
</pre>
</blockquote>
The first target, <b>jar</b> builds the test harness and only needs to be done
once after the <b>test</b> repository is checked out. The second target, <b>smoketest</b>,
runs the Xalan-J intepretive smoketest.
Running the <b>build smoketest</b> or other targets in the <b>test</b> directory
automatically looks for the jars in the directory <b>../java/build</b>
and that is why it is easiest to download the projects into suggested sibling
directories with the given names.
</p>
<p>
Towards the end of the console output you will see <b>two CONGRATULATIONS!</b> messages if all
goes well. The end of the console output should look like this:
<blockquote class="source">
<pre>
.
.
.
minitest-pass:
[echo] [minitest] CONGRATULATIONS! The Minitest passed!
[echo] [minitest] See details in smoketest/Minitest.xml
smoketest-notpass:
smoketest-pass:
[echo] [minitest] CONGRATULATIONS! The Smoketest passed!
[echo] [minitest] Details are in smoketest/results-conf.xml, smoketest/results-api.xml, smoketest/extensions/results-extensions.xml
smoketest:
BUILD SUCCESSFUL
Total time: 2 minutes 4 seconds
build completed!
</pre>
</blockquote>
</p>
<p>
Don't be fooled by the <b>BUILD SUCCESSFUL</b> messages, look for the two CONGRATULATIONS!
messages. If you run the smoketest for XSLTC with <b>build smoketest.xsltc</b> you wil
only get one CONGRATULATIONS! message if all goes well.
</p>
<a name="using-ant"></a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h3>Using Ant To Build</h3>
<p>
If you have downloaded a source distribution, or obtained source code
using subversion, this section may be of interest to you.
</p>
<p>Apache <a href="http://jakarta.apache.org/ant/index.html">Ant</a> is a flexible, powerful, and easy-to-use Java build tool that we include with the
Xalan-Java distribution. The Ant JAR file is in the tools directory, and the cross-platform XML build file (build.xml) is in
the root directory along with a Windows32 batch file (build.bat) and a UNIX shell file (build.sh). The build file defines
the "targets" that you can use Ant to build. The batch and shell files set up the classpath and launch Ant with the target
(and any other arguments) you provide.</p>
<p>
<b>Instructions for using Ant</b>
</p>
<ol>
<li>Set the JAVA_HOME environment variable to the JDK root directory.<br />
<br />
JDK 1.3.1 or higher is required to build Xalan-Java. You must put <code>tools.jar</code> from the JDK
bin directory on the classpath.<br />
<br />
</li>
<li>Depending on your environment, run the batch file (build.bat) or shell file (build.sh)
from the Xalan-Java root directory, optionally with arguments (see the table of targets below).<br />
<br />
The batch/shell file adds several JAR files to the classpath and launches Ant with any arguments
you provide. If you provide no target, Ant compiles the source files and rebuilds <code>xalan.jar</code>
(the "jar" target).</li>
</ol>
<p>The Xalan-Java source code tree is in the src directory.
</p>
<p>
If you are using Ant, the target is jar (the default).
</p>
<p>You can also set up your classpath manually (see build.bat or build.sh for the details), and
then run Ant as follows:<br />
<br />
<code>java org.apache.tools.ant.Main <b>
<i>target</i>
</b>
</code>
<br />
<br />
where <b>
<i>target</i>
</b> is nothing (for the default target) or one of the following.</p>
<table border="1">
<tr>
<td class="content" rowspan="1" colspan="1">
<b>Ant Target</b>
</td>
<td class="content" rowspan="1" colspan="1">
<b>What Ant does</b>
</td>
</tr>
<tr>
<td class="content" rowspan="1" colspan="1">compile</td>
<td class="content" rowspan="1" colspan="1">compiles Xalan-Java in build/classes.</td>
</tr>
<tr>
<td class="content" rowspan="1" colspan="1">jar (the default)</td>
<td class="content" rowspan="1" colspan="1">creates xalan.jar and serializer.jar in the build directory</td>
</tr>
<tr>
<td class="content" rowspan="1" colspan="1">serializer.jar</td>
<td class="content" rowspan="1" colspan="1">creates serializer.jar in the build directory</td>
</tr>
<tr>
<td class="content" rowspan="1" colspan="1">xsltc.jar</td>
<td class="content" rowspan="1" colspan="1">creates xsltc.jar in the build directory</td>
</tr>
<tr>
<td class="content" rowspan="1" colspan="1">samples</td>
<td class="content" rowspan="1" colspan="1">compiles and jars the sample apps in build/xalansamples.jar</td>
</tr>
<tr>
<td class="content" rowspan="1" colspan="1">servlet</td>
<td class="content" rowspan="1" colspan="1">compiles and jars the sample servlet in build/xalanservlet.jar</td>
</tr>
<tr>
<td class="content" rowspan="1" colspan="1">docs</td>
<td class="content" rowspan="1" colspan="1">creates the HTML User's Guide in build/docs</td>
</tr>
<tr>
<td class="content" rowspan="1" colspan="1">javadocs</td>
<td class="content" rowspan="1" colspan="1">generates the API documentation in ./build/docs/apidocs</td>
</tr>
<tr>
<td class="content" rowspan="1" colspan="1">fulldist</td>
<td class="content" rowspan="1" colspan="1">generates a complete distribution tree with zip and tar.gz distribution files in build</td>
</tr>
<tr>
<td class="content" rowspan="1" colspan="1">clean</td>
<td class="content" rowspan="1" colspan="1">purges the build and distribution</td>
</tr>
</table>
<p>If you build a target that depends on other targets, Ant creates those other targets in the correct order.
</p>
<p>
<b>Building without Ant</b>
</p>
<p>If you want to do the build without Ant, keep the following in mind:
</p>
<ul>
<li>Set the classpath to include the src directory, <code>xercesImpl.jar</code>, and <code>xml-apis.jar</code>.</li>
<li>Use a Java compiler (such as the IBM Just-In-Time compiler or the Sun javac) to compile all the .java files in the src
tree. </li>
<li>Use the <code>jar</code> utility to store the resulting .class files in <code>xalan.jar</code>
</li>
</ul>
<a name="samples"></a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h3>Rebuilding a sample application</h3>
<p>If you modify a sample and want to recompile it, you can run the Java compiler in the directory containing the
example. Be sure <code>xalan.jar</code>, <code>serializer.jar</code>, <code>xml-apis.jar</code>, and <code>xercesImpl.jar</code> are on the classpath. </p>
<p>To recompile and run the class files in the servlet subdirectory, the javax.servlet and
javax.servlet.http packages must also be on the classpath. These packages are available via
the <code>servlet.jar</code> file found in Apache Tomcat ( see <a href="http://tomcat.apache.org/">The Jakarta Site - Apache Tomcat</a> ).</p>
<p>After recompiling a sample, you can use the jar utility to place your new .class files in
<code>xalansamples.jar</code>.</p>
<p>You can use Ant with the samples target to recompile the samples and place the unpackaged class files in <code>xalansamples.jar</code>.
For more information, see <a href="#ant">Using Ant</a>.</p>
<table class="note">
<tr>
<td class="noteImg">
<img src="resources/note.gif" alt="note" />
</td>
<td class="noteTxt">To rebuild (and to run) the sample servlet, the javax.servlet and javax.servlet.http packages must be on your
classpath.</td>
</tr>
</table>
<a name="previous-releases"></a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h3>Where do I download previous releases?</h3>
<p>
To access previous releases, see the <a href="http://archive.apache.org/dist/xalan/xalan-j/">xalan-j archive directory</a>.
</p>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
</div>
<div id="footer">Copyright © 1999-2023 The Apache Software Foundation<br />Apache, Xalan, and the Feather logo are trademarks of The Apache Software Foundation<div class="small">Web Page created on - Thu 2023-09-09</div>
</div>
</body>
</html>