This release includes several bug fixes to the &xslt4j; and TrAX core and to the Xalan-Java 1 compatibility API. We also updated bsf.jar to the release candidate 2.2, which fixes a bug running JPython extensions.
Core bug fixes:
A threading problem showed up when using multiple processors. We fixed it by using a separate XPathContext object to do whitespace node
matches (xsl:strip-space).
Fixed a bug running Norm Walsh's DocBook stylesheets by not setting the variable stack position if the FilterExprWalker is not owned by a
top-level NodeIterator.
Fixed a problem with null namespace being passed from xsl:element. This bug also surfaced while processing DocBook
stylesheets.
In the interest of stability, we now treat "unknown error in XPath" as a fatal error.
Added support in stylesheet processing instructions for "text/xml" and "application/xml+xslt" mime types.
Fixed tokenizing of stylesheet processing instructions to allow parameters to be passed to server in href attributes.
Fixed a bug passing Transformer creation error messages to ErrorListener when an ErrorListener has been set on
TransformerFactory.
When using an Exception to instantiate a FactoryConfigurationError (extends Error), we now propagate the Exception message to
super().
Added defensive code to ElemTemplateElement for handling a null URI.
When using an Exception to instantiate a TransformerException (extends Exception), we now propagate the Exception message to super()
rather than a generic message.
Fixed a bug (the generation of an unwanted entity reference) performing the identity transformation
(see Serializing output) with an XML document containing a DOCTYPE
declaration.
Message manager modified so that the SourceLocator must always be passed in,
which will make a major difference in getting line number information.
xsl:element's handling of namespace attribute and prefix in
name attribute changed so that it no longer manufactures prefixes...
it always tries its best to match the prefix entered.
Bug fixed with namespace contexts in the stylesheet processor.
The bug could cause <a xmlns:a="x"><b> to produce <a xmlns:a="x"><b xmlns:a="x">.
Modified processing of xsl:message to enhance it as a debugging aid. Line numbers are now output with each
message. If the terminate attribute is true (the default is false) the message is sent to the console, and an exception is thrown with the
message "Stylesheet directed termination".
In TransformerException, check that the cause != null when checking for a contained exception.
Fixed a problem validating non-namespaced attributes and a problem allowing non-namespaced attributes to be children of the
stylesheet element.
Fixed checking of number of arguments in document() function.
Fixed problem with mutation of templates at run time. Templates resolution now takes place during the compose() method.
Fixed some minor threading issues in org.apache.xalan.stree (Child, Parent, ElementImpl, SourceTreeHandler).
Synchronized TrAX API functions subject to mutation to prevent mutation during a transformation.
Fixed bug reported by Jano Elovirta: substring() was returning an error if the start index is larger than the string.
Set StringKey.toString() to return the underlying String (m_str), thus avoiding a potential symmetry problem with the equals() method
reported by Ito Kazumitsu.
In response to note from Ito Kazumitsu, changed Java encoding name "EUCJIS" in FormatterToXML to "EUC_JP".
When Xalan creates a FileOutputStream, it now closes the stream before exiting.
Fixed handling of an exception that can be thrown while building a DOM.
Fixed a problem reported by Dimitry Voytenko serializing compiled stylesheets.
For support of applets, modified TransformerFactory System.getProperty() calls to catch SecurityExceptions.
Fixed a bug reported by Krishna Mohan Meduri setting output properties.
Fixed error recovery when xsl:element encounters a bad name or unresolvable prefix.
Added AbstractMethodError handling to existing NoSuchMethodError handling as a fallback to the XMLReaderFactory for XML parsers that do
not implement the JAXP parsers interface for creating an XMLReader
Fixed bug with cloned iterators reported by Tim Sean.
Fixed null pointer exception that could occur with getValue("xxx").
Fixed bug reported by Tim Sean handling the xml:space attribute.
Bug fixes in the Xalan-Java 1 compatibility API:
Fixed ProblemListener (for processing error messages) to derive from &xslt4j; 2 ErrorHandler.
Fixed evaluation of stylesheet string parameters to conform to &xslt4j; 1 behavior (expressions for &xslt4j; 1 vs. String objects
for &xslt4j; 2).
Added XPathSupport and XPathSupportDefault, and fixed the derivation of XObject sub-types (XString, etc.).
Fixed bug with XSLTProcessor process(xmlIn, null, out) method so that it uses the StylesheetRoot (if one exists) that has been created
with the processStylesheet() method.
For a list of tasks in the &xslt4j2; To-Do list that have been completed, see Tasks completed.