«
^
»
5.2. Using a tool to create HTML from XML and XSL
Instead of sprinkling HTML all over a program, we could use the XSL stylesheet that was produced earlier.
Many software developers provide a tool producing the document that results from applying XSL to XML.
The Apache Software Foundation provide Xalan.
It can be used in the following way:
java org.apache.xalan.xslt.Process -in consumables.xml -xsl consumables.xsl -out consumables.html
Assumes the classpath includes
xerces.jar
and
xalan.jar
.