































|
 |  |  |  | Downloading what you need |  |  |  |  |
| |
To use Xalan, you need the following:
- The JDK or JRE 1.1.8, 1.2.2, or 1.3
- xalan.jar
- xerces.jar (or another XML Parser)
You can get the JDK or JRE from ibm.com/java/jdk/ or java.sun.com.
For the binary distribution, which includes everything required to use and build applications with Xalan-Java, download xalan-j_2_2-bin.zip or xalan-j_2_2-bin.tar.gz. Both of these files contain Xalan-Java version 2.2 (with xalan.jar) and xerces.jar from Xerces-Java version 1.4.4. You can use a zip or tar utility to expand these files into a full build.
If you want the Xalan-Java source files, download xalan-j_2_2-src.zip or xalan-j_2_2-src.tar.gz. After you expand these files into the complete source tree, you can use Ant to do your own builds. For more information, see Build notes.
If you plan to run XSLT extensions, you need bsf.jar, which is included in the Xalan-Java distribution. If you plan to run XSLT extensions implemented in Javascript or another scripting language, you will need one or more additional files as indicated in extensions language requirements.
|
 |  |  |  | Setting up the system classpath |  |  |  |  |
| |
At the very minimum, you must include xalan.jar, xml-apis.jar, and xerces.jar (or another conformant XML parser -- see Plugging in a Transformer and XML parser) on the system classpath. To run the sample applications, include xalansamples.jar (all samples other than the servlet) and xalanservlet.jar. To run extensions, include bsf.jar. All these JAR files are distributed with Xalan-Java. For extensions implemented in JavaScript or another scripting language, see extensions language requirements to identify any additional JAR files you must place on the classpath and where you can get them.
If you are using JDK or JRE 1.1.8, also include classes.zip on the classpath. If you are using JDK or JRE 1.2, include tools.jar on the classpath.
 | If you are running Xalan on a 1.1.8 platform or recompiling Xalan on any platform, be sure to put xalan.jar and xml-apis.jar in front of xerces.jar on the classpath. Both JAR files include the org.w3c.dom packages. Xerces has added a number of DOM level-3 methods. These are not yet part of the W3C DOM recommendation, and Xalan does not support these methods. |
|
| |
The Xalan-Java distribution includes a number of basic sample applications. These samples are easy to run, and you can review the source files -- all of which are brief -- to see just how they work.
To run the samples, do the following:
- Set up your classpath (see above), including xalansamples.jar and (for the servlet) xalanservlet.jar.
- Be sure the java executable is on your path.
- Go to the samples subdirectory containing the sample (use the DOS shell if you are running Windows).
- Use the java executable to run the sample from the command line.
- Examine the application source and result files.
For example, go to the SimpleTransform subdirectory and issue the following command:
java SimpleTransform
The sample writes the transformation result to a file (birds.out). To see how the example works, examine the source files: birds.xml, birds.xsl, and SimpleTransform.java.
The extensions examples require additional JAR files on the classpath, and the procedure for running the sample applet and sample servlet is different. For more information about all the samples, see Xalan-Java Samples.
|
|
|