XSLT and org.apache.xalan.xslt.Process

Posted: July 8th, 2009 | Author: Chris
Catagories: Personal | Tags: ,
View Comments

I had to download and open the Xalan package from a mirror site at http://www.apache.org/dyn/closer.cgi/xml/xalan-j.

I had to set the class path in DOS. I read http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html to find the command.

set CLASSPATH=
C:\Program Files\Java\xalan-j_2_7_1\xalan.jar;
C:\Program Files\Java\xalan-j_2_7_1\serializer.jar;
C:\Program Files\Java\xalan-j_2_7_1\xml-apis.jar;
C:\Program Files\Java\xalan-j_2_7_1\xercesImpl.jar

You have to set each path you need and seperate them with semicolons (;). I read http://xml.apache.org/xalan-j/getstarted.html to find which .jar files I needed in the path. Then I dug through my computer to find them. Another note, the path needs to be set each time you run DOS.

Finally, I was able to run the Hello World transform that I found at http://docstore.mik.ua/orelly/xml/xslt/ch02_02.htm.

java org.apache.xalan.xslt.Process -in greeting.xml -xsl greeting.xsl -out greeting.html

And it worked!