| Tool | Official Site | Local Cache | Size | Installation Procedure | |
|---|---|---|---|---|---|
| 1 | Java Development Kit (JDK)
|
j2sdk-1_3_1-win.exe from java.sun.com | j2sdk-1_3_1-win.exe from keller.com | 32.8 MB |
|
| 2 | Tomcat servlet wrapper
|
jakarta-tomcat-3.3.1.zip from apache.org
![]() |
jakarta-tomcat-3.3.1.zip from keller.com | 4.7 MB | Unzip it into C:\tools\jakarta-tomcat-3.3.1 |
| 3 | The Xalan XSLT processor
|
xalan-j_2_4_D1-bin.zip from apache.org | xalan-j_2_4_D1-bin.zip from keller.com | 9.3 MB | Unzip it into C:\tools\xalan-j_2_4_D1 |
Copy the following files fromSTEP 3 -- Run the Tomcat serverC:\tools\xalan-j_2_4_D1\bintoC:\tools\jakarta-tomcat-3.3.1\lib\apps
JAR Name Description xalan.jar XSL processor xalanservlet.jar sample servlets xml-apis.jar JAXP (see below) xercesImpl.jar JAXP-compliant XML parser
set JAVA_HOME=C:\tools\jdk1.3.1
cd C:\tools\jakarta-tomcat-3.3.1\bin\
startup
http://localhost:8080/servlet/servlet.XSLTServletWithParams?...or simply click here.
URL=file:/tools/xalan-j_2_4_D1/samples/SimpleTransform/birds.xml&
xslURL=file:/tools/xalan-j_2_4_D1/samples/SimpleTransform/birds.xsl
That is, in place of file:/... substitute http://...
The modified URL becomes:
http://localhost:8080/servlet/servlet.XSLTServletWithParams?Save yourself some typing by clicking here.
URL=http://www.keller.com/downloads/xml/lab6b.xml&
xslURL=http://www.keller.com/downloads/xml/lab6b.xsl
This demonstrates that the various components of an application can be distributed around the web while the stylesheet processing is done on the local server.
The directory in which to install these files is:STEP 7 (Optional/Advanced) -- Read source codeC:\tools\xalan-j_2_4_D1\samples\SimpleTransformCaveat: Xalan is fussy about the stylesheet namespace. Be sure to declare it as:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
Read the Java source code for servlet.XSLTServletWithParams to get an idea of the architecture of an XML-generating program. The full pathname of this file is:C:\tools\xalan-j_2_4_D1\samples\servlet\XSLTServletWithParams.javaObserve that the crucial line of code -- in which the stylesheet transformation is done -- is line 130:transformer.transform(xmlSource, new StreamResult(out));