< xs l:tem plate m atch= "C us tom er">

 

 

< h1> Input X M L Form </h1>

 

 

< form ac tion= "/Travel/C ustom erX S LS ervlet" m ethod= "pos t">

X S LT

< table b order= "0" c ellpadding="2" c ells pacing= "0">

< xs l:apply-tem plates s elec t="firs tnam e"/>

 

styleshe et

< /table>

 

 

 

< /form >

 

 

< /xsl:tem plate>

 

 

C o m p ile r

 

 

JV M

transA .cla ss

 

b yteco d e

O utput

 

 

X M L inp ut

 

XM L,

 

H T M L, etc

file

 

 

 

tra n slet ru nn ing

 

 

on J V M

 

 

Figure 2-2 The XSLT compiler

The Apache XML project ( xml.apache.org) provides XSLTC, which is a compiler and runtime processor. The compiler can be used to compile an XSL stylesheet into a set of Java classes called translets. The classes than can be deployed, just like any other Java classes, along with the xsltc.jar and the runtime.jar. The compiler and the translets can be run from the command line, and also the TrAX/JAXP API. TrAX provides a framework and a standard API for performing XML transformation, and it uses systems properties to locate the Transformer and the XML parser.

The JAXP API can be found in the Java XML Pack, which can be downloaded from the Sun Web site. Besides the two methods, the XSLTC can also be used with the native Java API.

Xalan-Java Version 2 is an XSLT processor built upon on SAX 2 and DOM 2. It implements the W3C recommendations for XSLT and the XMl Path language (XPath). It can be used from the command line, in a Java class (applet or servlet), or as a module in another program.

For more details, visit Using XSLTC:The Apache XML Project at:

http://xml.apache.org/xalan-j/xsltc_usage.html

Xalan-Java version 2.4.D1: The Apache XML project at:

http://xml.apache.org/xalan-j/index.html

48 The XML Files: Development of XML/XSL Applications Using WebSphere Studio

Page 64
Image 64
IBM Version 5 manual For more details, visit Using XSLTCThe Apache XML Project at