|
| Unless otherwise specified, the usage discussed in this section refers to
the Xalan-Java Interpretive processor. See Getting Started with XSLTC
for information on using the Xalan-Java Compiling processor. |
| | | | Setting up the system classpath | | | | |
| |
At the very minimum, you must include xalan.jar , serializer.jar , xml-apis.jar ,
and xercesImpl.jar -- or another conformant XML parser -- see Plugging in a Transformer and XML parser) on the system classpath.
To run the Xalan-Java Interpretive processor sample applications, include xalansamples.jar
(all samples other than the servlet) and xalanservlet.jar . All these JAR files are
distributed with Xalan-Java. To run Javascript extensions, include bsf.jar , which can
be obtained from the Apache Jakarta
BSF project. For extensions implemented in other 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 XSLTC, see Getting Starting with XSLTC.
If you are using JDK or JRE 1.3.x or 1.4.x, include tools.jar on the classpath. If you
are using JDK or JRE 1.1.8 (supported for runtime only), then include classes.zip on the
classpath.
|
| |
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.
|
|
|