home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Book HomeXSLSearch this book

1.3. Installing Xalan

In this section, I'll show you how to install the Xalan XSLT processor. In the next chapter, we'll create our first stylesheet and use it to transform an XML document.

The installation process is pretty simple, assuming you already have a Java Runtime Environment (JRE) installed on your machine. Although very little of the code we look at in this book uses Java, the Xalan XSLT processor itself is written in Java. Once you've installed the JRE, go to http://xml.apache.org/xalan-j/ and download the latest stable build of the code. (If you're feeling brave, feel free to download last night's build instead.)

Once the Xalan .zip or .gzip file is downloaded, unpack it and add three files to your CLASSPATH. The three files include the .jar file for the Xerces parser, the .jar file for the Xalan stylesheet engine itself, and the .jar file for the Bean Scripting Framework. As of this writing, the .jar files are named xerces.jar, xalan.jar, and bsf.jar.

To make sure Xalan is installed correctly, go to a command prompt and type the following command:

java org.apache.xalan.xslt.Process

This is a Java class, so everything is case sensitive. You should see an error message like this:

java org.apache.xalan.xslt.Process
=xslproc options:
    -IN inputXMLURL
   [-XSL XSLTransformationURL]
   [-OUT outputURL]
   [-LXCIN compiledStylesheetFileNameIn]
   [-LXCOUT compiledStylesheetFileNameOutOut]

If you got this error message, you're all set! You're ready for the next chapter, in which we'll build our very first XSLT stylesheet.

Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.