&xslt4jc-short;'>
In April 2001, Sun donated &xslt4jc-short; to the Xalan project. &xslt4jc-short; compiles stylesheets into translets and
provides a runtime environment for using translets to transform XML documents. Initially, &xslt4jc-short; is
available in a separate JAR. Over time, we plan to integrate the two codebases. For more information,
see Using &xslt4jc-short;, &xslt4jc-short;
Release Notes, and
You can use the TrAX/JAXP 1.2 interfaces to compile and run translets. For this release, you must still use StreamSource objects for the XSL stylesheet and XML input document, and a StreamResult object for the transformation output. For an overview of the usage patterns these samples illustrate, see Calling &xslt4jc-short; with the TrAX/JAXP API.
Important: To run these samples, you must compile the sample class files and adjust the system classpath.
build xsltc.samplesWhat it does: Uses the &xslt4jc-short; TransformerFactory to compile a translet and use the translet to transform the &xslt4jc-short; to-do list from XML into HTML.
Complete the steps detailed above, and run this sample from the translets subdirectory with
java JAXPTransletOneTransformation
View the result in todo-xsltc.html.
What it does: Uses the &xslt4jc-short; TransformerFactory to compile a translet and use the Templates object associated with the translet to transform the &xslt4jc-short; and Xalan to-do lists from XML into HTML.
Complete the steps detailed above, and run this sample from the translets subdirectory with
java JAXPTransletOneTransformation
View the results in todo-xsltc.html and todo-xalan.html.
Other &xslt4jc-short; samples are located in the following samples subdirectories:
For information about each of these samples, consult the README file in the subdirectory.
&xslt4jc-short; provides demos for using &xslt4jc-short; as a servlet and as a handler for Brazil (a new and powerful Web techology from Sun labs).
To run the Brazil-handler demo, download Brazil from sunlabs:
The translet must be specified as a pure class name, accessible through the Brazil-handler's classpath. For example:
translet=mk054
The document must be specified as a valid URL. For example:
document=http://server/path/to/filename.xml
If the file is local to the Brazil handler, it has to be specified using the "file:filename.xml" format.
To run the servlet demo, download the java extensions for servlets from Sun: