http://xml.apache.org/http://www.apache.org/http://www.w3.org/

What's New

Overview
Downloads
Getting Started
Using XSLTC

FAQs

Sample Apps
Command Line

Usage Patterns
Features

TrAX
DTM
API (Javadoc)

Extensions
Extensions Library
XSLTC Exts

Release Notes

Xalan 2 Design
XSLTC Design

Bugs
Testing
Builds

Credits
XSLTC Credits

Xalan-Java 2.5 contains the following new features:

These new features have been driven by the need to have a closer integration and better code reuse between the Xalan Interpretive and the Xalan Compiled (XSLTC) processors. Prior to this release, the processors did not share much code and they had different underlying models for the input xml document. Xalan Interpretive used the Document Table Model (DTM) to model the input xml, while XSLTC used its own DOMImpl implementation. The serializers used by the processors were also different. As the project matures sharing more components between the processors becomes increasingly important. This makes the code more maintainable in the future and also eliminates some subtle behavioral differences between the Interpretive and the Compiled processors.

In addition to these design benefits, the integration of DTM with XSLTC and the common serializer provide conformance and performance improvements to our users. In a practical environment, the performance improvement for most stylesheets in XSLTC is likely to be in the range of 10-20%. Stylesheets that use a lot of small result tree fragments (RTF) can be a few times faster because of the new light-weight RTF model. Although the performance improvement work focused mainly on the XSLTC side, the enhancements introduced also contributed to performance benefits for the Xalan Interpretive processor. As a result, the Interpretive processor is roughly 5-10% faster in this release.

Integration of DTM into the Xalan Compiled processor (XSLTC)
 

As of the Xalan-Java 2.5 release, both the Xalan Interpretive and Xalan Compiled (XSLTC) processors use the same Document Table Model (DTM). XSLTC's underlying document model, DOMImpl, was replaced with DTM and the original DTM was extended so that it could be used more efficiently with XSLTC. Many of the DOM-related classes in XSLTC were adapted to work with the new DTM model and only a few changes were made in the compiler-related classes. However, because of the changes in the core component, the translets generated by the XSLTC in this release are not binary compatible with the translets generated by previous releases of XSLTC (up to and including Xalan Java 2.5.D1). You'll need to recompile your stylesheets when you switch to this new release.


Integration of Xalan Interpretive and Xalan Compiled Serializers
 

As of the Xalan-Java 2.5 release, a common serializer is shared between the Xalan Interpretive and Xalan Compiled (XSLTC) processors. The common serializer code resides in the org.apache.xml.serializer package. The new serializer is designed to take the benefits of the old serialization mechanisms from both sides. By using the common serializer, many of the output differences between the Interpretive and the Compiled processor go away, and maintenance effort is reduced.

During the merge of the Xalan Interpretive and XSLTC serializers, an effort was made to use the best performing features from each serializer. The new class hierarchy is similar to the one used by XSLTC. At the highest level the serializer classes split based on whether the output handler type ("Stream" or "SAX"). At the next level, the hierarchy branches based on the output type (XML, HTML or TEXT). This allows each flavor of serializer to do optimizations based on the output type and whether that output is going to a "Stream" or a "SAX" handler.

From a functional point of view, the new serializer's output matches the behavior of the Interpretive processor's old serializer, such as the choice of which HTML entities to write out, and how to escape attribute values in documents written to a stream.



Copyright © 2003 The Apache Software Foundation. All Rights Reserved.