logolineright
bottomhttp://xml.apache.org/http://www.apache.org/http://www.w3.org/
join
What's New
Release Notes
separator
Overview
Downloads
Getting Started
Using XSLTC
separator
FAQs
separator
Sample Apps
Command Line
separator
Features
Transform API
XPath API
Usage Patterns
separator
Xalan-J API
Public APIs
DTM
separator
Extensions
Extensions Library
XSLTC Exts
separator
Xalan 2 Design
XSLTC Design
separator
Source Repository
Xalan-Java Builds
Testing
User Mail Archive
Dev Mail Archive
Bug Reporting
close

Xalan-Java Version 2.7.0

Status
 
Changes since Xalan-Java 2.6.0
 

Xalan-Java 2.6.0 contains the following functional enhancements, performance enhancements and bug fixes:


Changes since Xalan-Java 2.5.2
 

Xalan-Java 2.6.0 contains the following functional enhancements, performance enhancements and bug fixes:

  • Improvement in translet initialization time.
  • Addition of a translet versioning mechanism. If the translet version detected by the XSLTC runtime is more recent than any supported by the XSLTC runtime, an error will be reported.
  • Changes that allow XSLTC to use other DTM implementations.
  • Changes in the XML Serializer. The serializer will no longer put a newline after the xml header tag unless indent="yes". See bugzilla 24304.
  • Rename of Xalan Java's xalan:doc-cache-off processing instruction to xalan-doc-cache-off. This change was necessary due to a recent change in Xerces. Xerces has started detecting the Namespace well-formedness rule that a processing instruction's PITarget must not contain a colon. The old-style PI (xalan:doc-cache-off) will be accepted provided that the XML parser does not report it as an error. See bugzilla 26217.
  • Enhancement to XSLTC's URIResolvers and the general mechanism to resolve relative URIs. XSLTC is now compatible with Xalan Intepretive.
  • Addition of a TransformThread sample that demonstrates how to use different transformers on different threads and in different modes.
  • Upgrade to Xerces-J (2.6.2) and a new version of xml-commons (xml-commons-external-1.2.01)
  • Elimination of "enum" as a name to allow compilation under JDK 1.5
  • Bugzilla fixes: 797, 1396, 5761, 15140, 16889, 18351, 19194, 19464, 22376, 23046, 23591, 24278, 24111, 24187, 24188, 24302, 24304, 24365, 24414, 24518, 24695, 24728, 24788, 24793, 24958, 24979, 24985, 24988, 25368, 25416, 25442, 25449, 25816, 25924, 26019, 26030, 26075, 26169, 26217, 26697, 26742, 26829, 26842
  • For a list of Xalan-Java commits, see xalan-cvs@xml.apache.org in the Apache mailing list archive index.

Changes since Xalan-Java 2.5.1
 

Xalan-Java 2.5.2 contains bug fixes and performance enhancements.

Fixes in this release include the following:


Changes since Xalan-Java 2.5.0
 

Xalan-Java 2.5.1 contains bug fixes and performance enhancements.

Fixes in this release include the following:


Changes since Xalan-Java 2.5.D1
 

Xalan-Java 2.5.0 contains a variety of features, bug fixes and performance enhancements.

New features in Xalan-Java 2.5.0 include:

  • integration of the Document Table Model (DTM) with the XSLTC processor [Henry Zongaro, Morris Kwan] and
  • integration of the Xalan Interpretive and Xalan Compiled serializers into a common serializer [Brian Minchau].
These features have been driven by a need to get common behavior, improve maintainability, reduce duplication of effort for future work, and in some cases improve performance and conformance.

Refer to What's New for a description of the new function and History of software changes for a list of the various bug fixes and other enhancements in this release.


Changes since Xalan-Java 2.4.1
 

This developer's release, Xalan-Java 2.5.D1, is primarily for the purpose of releasing various bug fixes to the community. These will eventually be released officially in a future Xalan-Java 2.5 version, along with some new function.

Fixes in this release include the following:


Changes since Xalan-Java 2.4.0
 
  • Performance fixes and enhancements to address the degradation of performance between Xalan-Java version 2.3.1 and Xalan-Java 2.4.0.
  • A prototype implementation of the DOM Level 3 XPath Specification. The implementation is considered 'experimental' at this time due to the status of the specification. See the new sample, ApplyXPathDOM for an example of how to use this API.
  • Extension changes and enhancements:
    • Implement canonical namespaces for all Xalan extensions. All extensions now use namespaces starting with http://xml.apache.org/xalan. The old namespaces are still supported for backward compatibility. See the updated extensions documentation for details.
    • Added new EXSLT extension functions, including the EXSLT dynamic extension functions max, min, sum, map, evaluate and closure, the EXSLT strings extension functions align, concat, padding, split and tokenize, and some new extension functions in the math module.
    • Reorganized the extension functions for new EXSLT extensions. The implementation of some extension functions (intersection, difference, distinct, evaluate and tokenize) are moved from the main Extensions class to the corresponding EXSLT modules.
    • Enable the EXSLT extensions for XSLTC. The EXSLT common, math, sets, dates-and-times and strings modules can be used in XSLTC.
    • Integration of the nodeset and redirect extension for XSLTC. You can now use Xalan namespaces for these extensions in XSLTC.
    • Enhancement in Java extenion for XSLTC. Three namespace formats (Java, package and class) can all be used in XSLTC. More type conversion rules are added as well.
  • Enable support for invoking transformations using the Xalan compiler (XSLTC) via the Xalan interpretive Process command line. Specifically, the -XSLTC option was added. The -TT, -TG, -TS, -TTC, -QC, -L, -INCREMENTAL, -NOOPTIMIZE and -RL option do not work in XSLTC mode. All other existing options can be used with -XSLTC. Additional options were added to enable XSLTC compile and transform modes: -XO, -XD, -XJ, -XP, -XN, -XX, -XT. See the Process usage statement for more information on these options.
  • Fixed SQL Extension problem where a query that returned zero rows would incorrectly return a JDBC exception.
  • Fixed a limitation for XPath expressions. The token queue and operations map can now grow to accomodate really large XPath expressions.
  • Fixes for the following bugzilla defects: 4344, 5046, 6181, 6927, 7161, 7357, 8175, 8473, 8939, 9731, 9959, 10176, 10384, 10414, 10643, 11073, 11341, 11661, 11743, 11809, 12077, 12127, 12298, 12687, 13059, 13303, 13305, 13106, 13501, 13711, 13754, 13863, 13944, 14022
  • Support for and bundling of Xerces Java 2.2.
  • Support for and bundling of xml-apis.jar from the factoryfinder-build of the RIVERCOURT1 branch of xml-commons. This version of the Java APIs for XML Processing successfully passes the JAXP 1.1 and JAXP 1.2 TCKs.
  • For a list of Xalan-Java commits, see xalan-cvs@xml.apache.org in the Apache mailing list archive index.
  • Support building Xalan with JDK 1.4.

Changes since Xalan-Java 2.3.1
 
  • Fixes for the following bugzilla defects: 3238, 4603, 5013, 5016, 5941, 6071, 6268, 6284, 6356, 6547, 6798, 6833, 6925, 6972, 7023, 7118, 7123, 7157, 7410, 7776, 8324, 8358, 8551, 8894, 9068, 9137, 9146, 9171, 9174, 9179, 9572, 9575, 9683, 9753, 10137, 10306, 10323, 10625, 10715, 10832, 10837, 10839, 10914, 10945, 11123, 11166, 11221, 11345, 11704, 11987, 11828, 12075
  • .
  • Xalan-Java now uses a list of supported encodings in a properties file (org.apache.xml.serializer.Encodings.properties). Fixes Bugzilla 6356. Patch from Sergey Ushakov.
  • Support for the EXSLT function and result elements, and EXSLT date-and-time functions.
  • Improvements to the extensions mechanism to more efficiently handle the detection and analysis of extensions during the stylesheet "composition" process, and the generation of the required extension handlers during initialization of the transformation process.
  • Performance improvement. Instead of looping through the ExtendedType objects, use a hashtable and go directly to the correct object.
  • Separation of source and messages. Messages have been moved into property files for easier localization.
  • XSLTC version upgraded from 1.0 to 1.2.
  • Support for and bundling of Xerces Java 2.1.
  • Support for and bundling of xml-apis.jar from the RIVERCOURT1 branch of xml-commons. This version of the Java APIs for XML Processing successfully passes the JAXP 1.1 and JAXP 1.2 TCKs.
  • For a list of Xalan-Java commits, see xalan-cvs@xml.apache.org in the Apache mailing list archive index.

Other points of interest
 
  • Xalan Java 2 is integrated with release 2 of Xerces-Java. Xalan-Java Version 2.7.0 does not include support for the deprecated Xalan-Java 1 compatability API. The Xalan-Java 1 compatability code does NOT compile with Xerces-Java 2.

  • The SQL extension samples continue to use InstantDB, but based on our realization of changes that have occurred in the licensing of InstantDB, we no longer include InstantDB and the associated sample database with our distibution. We do, however, provide information on how to set up InstantDB to support our SQL extension samples.

  • Documentation updates: We have subdivided the release notes into multiple files to accelerate HTML document loading, and we have added a document on Transform features.

  • If an attempt is made to coerce a different namespace onto a prefix already in use in xsl:attribute, the attribute will come out in the wrong namespace. Workaround: either provide an NCName instead of a QName for the attribute, or provide a QName with a prefix not used elsewhere.

  • Handling xsl:namespace-alias declarations: In release 2.0.D01, we reported the need to do some research concerning exactly how Xalan should handle xsl:namespace-alias declarations. As a result of discussions among members of the W3C Working Group on XSL, we have reached a more precise consensus on how namespaces should be represented when an xsl:namespace-alias declaration is in effect.

    If a literal result element has a namespace prefix, the prefix will be preserved and the namespace URI of the element will be as specified in the xsl:namespace-alias element, but the result-prefix is not required to appear in the result. This also applies to the two other cases of "Literal namespace URI" mentioned in the XSLT Recommendation on Literal Result Elements. More simply, if the stylesheet calls for <axsl:foo> to be output as a literal result element, then it will be output as <axsl:foo> in the result, but the namespace associated with this "axsl" prefix will be as designated in the xsl:namespace-alias declaration.

  • For HTML output, Xalan-Java 2 outputs character entity references (&copy; etc.) for the special characters designated in Appendix A. DTDs of the XHTML 1.0: The Extensible HyperText Markup Language. Xalan-Java 1.x, on the other hand, outputs literal characters for some of these special characters.

  • In conformance with the XSLT Recommendation on the HTML Output Method and Section B.2.1 of the HTML 4.0 Recommendation, Xalan-Java 2 uses %hh encoding for each byte of the UTF-8 representation of non-ASCII characters in HTML URI attributes.

  • When your stylesheet asks for an explicit carriage-return character (&#13;) to be inserted into the output, it is output during the serialization process in escaped form unless escaping has been disabled. When your stylesheet asks for an explicit line-feed character (&#10;) to be output, the system-default line-break character(s) is/are output during the serialization process. Also keep in mind that the XML parser normalizes line-breaks to line-feeds when it sends character events to the processor.

  • If your XML input is a DOM, use the javax.xml.parsers.DocumentBuilderFactory setCoalescing() method to set coalescing to true (it is false by default), if you want to append CDATA sections to adjacent text sections to form a single text node (as the XPath standard calls for), and if the XML parser supports this feature (Xerces-Java 2.7.1 does not).

  • When you traverse the namespace axis for a collection of element nodes, Xalan-Java includes one namespace node for each namespace in scope for one or more of the nodes in that collection. The XPath expression does not return additional (redundant) namespace nodes for each element for which the namespace nodes are in scope.

  • See Bugzilla bug 2291 for a discussion of issues surrounding use of the default character encoding to read META-INF/Services.

  • As Bugzilla bug 1800 reports, the Transformer does not get the setTransformState event until after the startDocument event. This could present a problem for tools developers, and we do intend to fix this bug.

Version of Xerces to use
 

The Xalan-Java Version 2.7.0 has been tested with Xerces-Java 2.7.1. The Xalan-Java Version 2.7.0 download includes xercesImpl.jar from Xerces-Java 2.7.1 and xml-apis.jar. For version information about the contents of xml-apis.jar, see the JAR manifest. For information about including xercesImpl.jar and xml-apis.jar on the system class path, see Setting up the system class path.

Important You may experience unpredictable anomalies if your Xalan-Java and Xerces-Java builds are not in synch. If you download an update to Xalan-Java, check the release notes to determine which version of Xerces-Java you should use.

NoteYou can use Xalan-Java with other XML parsers that implement the Java API for XML Processing 1.2. See Plugging in the Transformer and XML parser.


Build Notes
 

We provide two distributions: a binary distribution, and a source distribution. See Downloading what you need. If you have downloaded the binary distribution, you already have a build. If you downloaded the source distribution, you can use Ant to build Xalan-Java, including xalan.jar, serializer.jar, xalansamples.jar, xalanservlet.war, the user documentation, and the Javadoc API documentation. You need the source distribution to do builds. Keep in mind that if you have also downloaded the binary distribution, any builds you run will overwrite that binary distribution.

Using Ant
 

Apache Ant is a flexible, powerful, and easy-to-use Java build tool that we include with the Xalan-Java distribution. The Ant JAR file is in the tools directory, and the cross-platform XML build file (build.xml) is in the root directory along with a Windows32 batch file (build.bat) and a UNIX shell file (build.sh). The build file defines the "targets" that you can use Ant to build. The batch and shell files set up the classpath and launch Ant with the target (and any other arguments) you provide.

Instructions for using Ant

  1. Set the JAVA_HOME environment variable to the JDK root directory.

    JDK 1.3.1 or higher is required to build Xalan-Java. You must put tools.jar from the JDK bin directory on the classpath.

  2. Depending on your environment, run the batch file (build.bat) or shell file (build.sh) from the Xalan-Java root directory, optionally with arguments (see the table of targets below).

    The batch/shell file adds several JAR files to the classpath and launches Ant with any arguments you provide. If you provide no target, Ant compiles the source files and rebuilds xalan.jar (the "jar" target).

You can also set up your classpath manually (see build.bat or build.sh for the details), and then run Ant as follows:

java org.apache.tools.ant.Main target

where target is nothing (for the default target) or one of the following.

Target  What Ant does 
compile  compiles Xalan-Java in build/classes. 
jar (the default)  creates xalan.jar and serializer.jar in the build directory 
samples  compiles and jars the sample apps in build/xalansamples.jar 
servlet  compiles and jars the sample servlet in build/xalanservlet.jar 
docs  creates the HTML User's Guide in build/docs 
javadocs  generates the API documentation in ./build/docs/apidocs 
fulldist  generates a complete distribution tree with zip and tar.gz distribution files in build 
clean  purges the build and distribution 

If you build a target that depends on other targets, Ant creates those other targets in the correct order.


Building Xalan-Java
 

The Xalan-Java build is in xalan.jar. The serializer classes of Xalan-Java are in serializer.jar. The Xalan-Java source code tree is in the src directory.

If you are using Ant, the target is jar (the default). For more information, see Using Ant.

If you want to do the build without Ant, keep the following in mind:

  • Set the classpath to include the src directory, xercesImpl.jar, and xml-apis.jar.
  • Use a Java compiler (such as the IBM Just-In-Time compiler or the Sun javac) to compile all the .java files in the src tree.
  • Use the Sun jar utility to store the resulting .class files in xalan.jar

Rebuilding a sample application
 

If you modify a sample and want to recompile it, you can run the Java compiler in the directory containing the example. Be sure xalan.jar, serializer.jar, xml-apis.jar, and xercesImpl.jar are on the classpath.

To recompile and run the class files in the servlet subdirectory, the javax.servlet and javax.servlet.http packages must also be on the classpath. These packages are available via the servlet.jar file found in Apache Tomcat ( see The Jakarta Site - Apache Tomcat ).

After recompiling a sample, you can use the Sun jar utility to place your new .class files in xalansamples.jar.

You can use Ant with the samples target to recompile the samples and place the unpackaged class files in xalansamples.jar. For more information, see Using Ant.

NoteTo rebuild (and to run) the sample servlet, the javax.servlet and javax.servlet.http packages must be on your classpath.

Rebuilding the Xalan-Java documentation
 

Xalan-Java includes a number of XML source files, XSL stylesheets, document type definition (DTD) files, entity relationship (ENT) files, graphics, and a JavaScript file that provide the input for the Xalan-Java HTML User's Guide, and the overview and package-level documents used during the generation of Javadoc.

To rebuild the documentation, you must use the StyleBook tool and the JDK 1.2.2 java and javadoc tools. StyleBook (which uses Xalan and Xerces) is in stylebook-1.0-b2.jar. Some of the document definition files, stylesheets, and resources are stored in xml-site-style.tar.gz, and are unzipped when you run Ant as described below.

You can use Ant with the docs target to regenerate the User's Guide and with the javadocs target to regenerate the Javadoc API documentation. For more information, see Using Ant.



Getting in Touch
 

Your feedback is more than welcome. Offers of help are even more so! Perhaps you would like to take on an active role in the ongoing development, testing, and documentation of Xalan-Java?

Please email your comments, questions, suggestions, and offers to join the Xalan team to Xalan Development Mailing List.



dot
Copyright © 2005 The Apache Software Foundation. All Rights Reserved.