Xalan-Java 2 represents a fundamental redesign of Xalan. The primary objective of this redesign is an easier-to-use, more understandable, and more modular API that encourages wider participation in its ongoing development by the open-source XML developer community, and that lends itself to "streaming," the production of transformation output while the input is still being parsed.
Xalan-Java 2 builds on SAX 2, DOM level 2, and the Java API for XML Parsing 1.0. For example, Xalan-Java 2 incorporates the SAX parsing event model in its support for the incremental production of transformation output. Xalan-Java 2 also implements the standard TrAX API (see below) that enables you to code your XML applications without reference to the internal details of a particular Transformer or XML parser.
Given the scope of the redesign, the changes with respect to Xalan-Java 1.x are global in nature. For an introduction to the Xalan-Java 2 usage patterns, see Basic Usage Patterns.
Xalan-Java 2 implements the TRaX (Transformation API for XML) interfaces. The product of extensive open-source collaboration by members of the XML developer community, TrAX provides a conceptual framework and a standard API for performing XML transformations. During its evolution, the TrAX API has undergone several revisions. We believe this API has now reached or is very close to final form. In November 2000, TrAX was incorporated into Java Specification Request 63, the Java API for XML Processing 1.1 , which has been published for public review (see Java API for XML Processing 1.1 Public Review 2). We strongly encourage you to utilize the TrAX framework when you use Xalan-Java 2 to perform XML transformations.
The basic organization of TrAX is quite simple: use a TransformerFactory to process transformation instructions and generate a Transformer, with which you can apply the processed transformation instructions to your XML Source, producing a transformation Result. For more detail, see Basic steps.
As part of the Java API for XML Processing, TraX provides a stable framework for plugging Transformers (like Xalan-Java) and XML parsers (like Xerces-Java) into your applications without tying yourself to the internal details of those implementations. See Plugging in a Transformer and XML parser.