One way to use Xalan in the CS environment.

Spring 2010

1. login to a linux machine ( etc).

2. Follow the instructions at to download the file. 

The one I took was from

3. Unpack the file. I extracted everything to /home/nigel/xalan.

4. Set up the classpath.  There are different ways to do this, but I just opened up a konsole (terminal window) and typed 

export CLASSPATH=$CLASSPATH:/home/nigel/xalan/xalan.jar:/home/nigel/xalan/xercesImpl.jar:/home/nigel/xalan/xml-apis.jar  

if you're afraid you mistyped, it, look at the output of 


it should look something like this: 


5. Test that the classpath is okay. Just type java org.apache.xalan.xslt.EnvironmentCheck (as described at

the last line of the output should say "seems to be OK"

6. Go ahead and try java org.apache.xalan.xslt.Process, as described in class.

For example, 

  from the xalan directory, cd to samples/SimpleTransform.

  java org.apache.xalan.xslt.Process -IN birds.xml -XSL birds.xsl -OUT listing.txt

then view listing.txt

  If this fails, or if you prefer not to use the command line, try steps 7 and 8.

7. Following the instructions at, from the xalan directory, cd to samples/SimpleTransform.

create a jar file with javac 

export CLASSPATH=$CLASSPATH:/home/nigel/xalan/samples/SimpleTransform/SimpleTransform.jar

java SimpleTransform

observe that birds.out has been created.

8. From this point you can presumably copy and edit to do what you want.