The Cover PagesThe OASIS Cover Pages: The Online Resource for Markup Language Technologies
Advanced Search
Site Map
CP RSS Channel
Contact Us
Sponsoring CP
About Our Sponsors

Cover Stories
Articles & Papers
Press Releases

XML Query

XML Applications
General Apps
Government Apps
Academic Apps

Technology and Society
Tech Topics
Related Standards
Created: August 26, 2002.
News: Cover StoriesPrevious News ItemNext News Item

Apache Xalan XSLT Compiler (XSLTC) Integrated into the Java Web Services Developer Pack (WSDP).

An announcement from Sun Microsystems' XML Technology Center describes the availability of a new Java Web Services Developer Pack integrating the Apache Xalan XSLT Compiler. The XSLT Compiler (XSLTC) is a "high-performance alternative to the Xalan Classic XSLT Processor for transforming XML documents into a variety of output formats. XSLTC is a free, open-source, Java-based tool that generates fast and lightweight Java class files called translets that can be plugged into existing applications or used directly for transforming XML files according to an input XSL stylesheet. It assists developers who need high-volume, portable, embeddable XML transformation capabilities in their applications." The Java Web Services Developer Pack (Java WSDP) is "a free, integrated toolset that in conjunction with the Java platform allows Java developers to build, test and deploy XML applications, Web services, and Web applications. The Java WSDP provides Java standard implementations of existing key Web services standards including WSDL, SOAP, ebXML, and UDDI as well as important Java standard implementations for Web application development such as JavaServer Pages (JSPTM pages) and the JSP Standard Tag Library. These Java standards allow developers to send and receive SOAP messages, browse and retrieve information in UDDI and ebXML registries, and quickly build and deploy Web applications based on the latest JSP standards. Java WSDP Version 1.0_01 also includes: (1) Java XML Pack [Java API for XML Messaging (JAXM); Java API for XML Processing (JAXP) with XML Schema support; Java API for XML Registries (JAXR); Java API for XML-based RPC (JAX-RPC); SOAP with Attachments API for Java (SAAJ)]; (2) JavaServer Pages Standard Tag Library [JSTL] (3) Java WSDP Registry Server; (4) Web Application Deployment Tool; (5) Ant Build Tool; (6) Apache Tomcat 4.1.2 container.

XSLTC description from the announcement:

XSLTC was originally developed by the Sun Microsystems XML Technology Center and donated to the Apache Open Source Foundation as a component of the Xalan-J2 project.

The key benefits of XSLTC are speed and portability. XSLTC works by transparently compiling XSL stylesheets into Java byte code (translets), which can then be used repeatedly to perform XSLT transformations on one or many XML files. Because a translet is compiled only once no matter how many XML files you transform with it, XSLTC provides its greatest speed gains the more XML files you transform. Moreover, because XSLTC translets are small Java classes that can be run directly or embedded in other applications, they can be used in a wide range of environments, including those in which the full processing of XSL stylesheets may not be possible.

XSLTC is optimized around a model in which many similar XML files use the same stylesheet, or in which the same XML file is transformed many times with one or more stylesheets. By compiling the translets up front -- separating the compilation of stylesheet instructions from the transformation processing -- XSLTC is able to deliver higher performance at runtime since a significant part of the work to do a transformation (processing the stylesheet) is only done once for any given translet. An additional benefit of this model is that XSLTC translets are extremely small in terms of both file size and memory footprint, making them particularly well suited for Java applets, because the translets contain only the XSLT instructions that are actually present in the source stylesheet.

The Java WSDP includes two XSLT transformation engines: [1] The 'Classic' Xalan XSLT Processor. [2] XSLTC (the XSLT Compiling Processor). The 'Classic processor is the default XSLT transformation engine that is used when you use the Java API for XML Processing (JAXP) transform package. XSLTC is generally much faster than the Classic processor. The speed difference is especially noticeable in cases where many documents are transformed against a relatively static set of stylesheets, or where a particular set of documents is processed repeatedly. In such cases, XSLTC and the Classic processor will perform similarly on the first transformation, because both processors need to read and parse the stylesheet against the entire XSLT language. XSLTC will be much faster on subsequent transformations, however, because the smaller, more efficient compiled XSLTC translet contains byte code for only the XSLT directives that are actually present in the source stylesheet, and can be reused for subsequent transformations. By contrast, the more generalized Classic processor must by design be able to process the entire XSLT language for each transformation, which means that it is typically much larger and has more processing overhead than a translet. Moreover, in cases where the processing engine must be passed "over the wire" (for example, in a Java applet) or otherwise held in memory, using the much smaller translets can provide significant increases in efficiency.

Hosted By
OASIS - Organization for the Advancement of Structured Information Standards

Sponsored By

IBM Corporation
ISIS Papyrus
Microsoft Corporation
Oracle Corporation


XML Daily Newslink
Receive daily news updates from Managing Editor, Robin Cover.

 Newsletter Subscription
 Newsletter Archives
Bottom Globe Image

Document URI:  —  Legal stuff
Robin Cover, Editor: