&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 Getting Started with &xslt4jc-short;, &xslt4jc-short; Release Notes, and &xslt4jc-short; Design.

'> For &xslt4jc-short; changes since &xslt4jc-short; was incorporated into &xslt4j;, see &xslt4jc-short; software changes.'> If you are using &xslt4jc-short;, see Setting the system classpath for &xslt4jc-short;.

'> translets'>

You can use the JAXP interfaces to compile and run translets. For an overview of the usage patterns these samples illustrate, see Calling &xslt4jc-short; with the JAXP API.

What 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.

Run this sample from the translets subdirectory with

java JAXPTransletOneTransformation

View the result in todo.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.

Run this sample from the translets subdirectory with

java JAXPTransletMultipleTransformations

View the results in todo.html and todotoo.html.

Other &xslt4jc-short; samples are located in the following samples subdirectories:

  • CompiledServlet
  • CompiledBrazil
  • CompiledJAXP
  • CompiledApplet
  • CompiledEJB

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:

    http://research.sun.com/research/download/index.html

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.

In order to run the Brazil-handler demo, you also need to make the Brazil and javax classes available from your classpath

To run the servlet demo, download the java extensions for servlets from Sun:

     http://java.sun.com/products/servlet/download.html

'>