blob: 46db54cab1a5114c2fa9cf68d5b679648f02666e [file] [log] [blame]
<s3 title="Changes for &xslt4j; 2.0.1">
<p>This release includes a number of bug fixes to the &xslt4j; and TrAX core and Xalan-Java 1 compability API. We have also</p>
<ul>
<li>Entered all known &xslt4j; 2 <link anchor="bugs">bugs</link> in the Apache Bugzilla database<br/><br/></li>
<li>Added support for using custom URIResolver, EntityResolver, and ContentHandler implementations with the <link
idref="commandline">command-line utility</link><br/><br/></li>
<li>Upgraded from Ant 1.2 to Ant 1.3 for our <link anchor="build">builds</link> (the new ant.jar is in the bin directory).</li>
</ul>
<p>Core source code updates:</p>
<ul>
<li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/06/2001<br/><ref>Modified: </ref>java/src/org/apache/xpath/axes ChildWalkerMultiStep.java<br/><ref>Committer's log entry: </ref>Fix for bug reported by "Chris P. McCabe" &lt;chris_mccabe@choicehotels.com&gt;
02/06/2001 06:55 PM.
Defensive fix for if the last used walker is null, then don't check to
see if it is a fast walker! Without this, a null pointer exception is
very possible.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/06/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer TransformerImpl.java<br/><ref>Committer's log entry: </ref>Fixes for exceptions being thrown that weren't being passed through
the error listener.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/07/2001<br/><ref>Modified: </ref>java/src/org/apache/xpath/axes FollowingWalker.java<br/><ref>Committer's log entry: </ref>Fix for bug reported by Dave Haffner &lt;dave.haffner@xmls.com&gt;
02/06/2001 04:03 AM
In parentNode(), don't screen out nextAncestor, since the parent
is never actually returned. This sets things up correctly for firstChild
and nextSibling.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/07/2001<br/><ref>Modified: </ref>java/src/org/apache/xpath/axes PrecedingWalker.java<br/><ref>Committer's log entry: </ref>Fix for bug reported by Dave Haffner &lt;dave.haffner@xmls.com&gt;
02/06/2001 04:03 AM
In nextSibling(), don't return null if isAncestorOfRootContext, instead
do next.getFirstChild().<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/07/2001<br/><ref>Modified: </ref>java/src/org/apache/xpath SourceTreeManager.java<br/><ref>Committer's log entry: </ref>Fix for bug reported by anders.domeij@uc.se
02/07/2001 09:35 AM
removed extra bogus TransformerException decl in resolveURI<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/08/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/stree SourceTreeHandler.java<br/><ref>Committer's log entry: </ref>Fix bug reported by Jason Harrop &lt;jharrop@bigpond.net.au&gt;
02/07/2001 08:12 PM
Don't process comment or whitespace events if inside a startDTD/endDTD
event.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/10/2001<br/><ref>Modified: </ref>java/src/org/apache/xpath/axes WalkerFactory.java<br/><ref>Committer's log entry: </ref>In indirect response to bug posted by "Thee Boon Hoo" &lt;theebh@newstakes.com&gt;
02/07/2001 09:37 PM
"//table[1]" patterns would give one node
when they should have given 2, when applied to Boon Hoo's
source.
"//table[1]" is equivelent to
"/descendant-or-self::node()/table[1]",
and so must return the first table child
of each table-inst element.
An optimization was optimizing this to
"/descendant-or-self::table, which is
fine as long as indexing isn't used. Since
we can not tell until runtime if indexing
is being used, we have to turn of this
optimization for all predicated "//foo[xx]"
patterns.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>02/12/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/processor StylesheetPIHandler.java
TransformerFactoryImpl.java<br/><ref>Committer's log entry: </ref>Patch for Dmitri IIyin to use the specified URIResolver.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>02/12/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/templates ElemNumber.java<br/><ref>Committer's log entry: </ref>Number Expression should be evaluated then rounded up.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/13/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/xslt Process.java<br/><ref>Committer's log entry: </ref>Create a document fragment for the output node, for -flavor d2d.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/13/2001<br/><ref>Modified: </ref>java/src/org/apache/xpath/compiler Compiler.java<br/><ref>Committer's log entry: </ref>Better error message when quo is used.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>02/13/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/templates ElemCallTemplate.java
ElemChoose.java ElemCopy.java ElemFallback.java
ElemIf.java ElemLiteralResult.java
ElemTemplate.java
java/src/org/apache/xalan/transformer TransformerImpl.java<br/><ref>Committer's log entry: </ref>Remove extra method/call to TransformerImpl.executeChildTemplates()<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/13/2001<br/><ref>Modified: </ref>java/src/org/apache/xpath/patterns NodeTest.java<br/><ref>Committer's log entry: </ref>Return an empty string instead of null from getLocalName() when the
nodetest does not have a name. Encountered with the SQL extension,
in response to bug reported by "Michael Kay" &lt;mhkay@iclway.co.uk&gt;,
02/08/2001 08:57 AM.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/13/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/lib/sql ColumnData.java<br/><ref>Committer's log entry: </ref>In getData() return an empty string instead of null if there is
no data to be obtained.
In response to bug reported by "Michael Kay" &lt;mhkay@iclway.co.uk&gt;,
02/08/2001 08:57 AM.<br/><br/></li><li><ref>Committed by </ref>garyp@apache.org<ref> on </ref>02/19/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/extensions MethodResolver.java<br/><ref>Committer's log entry: </ref>Correct ConversionInfo array for Node-Set and RTF. Remove DocumentFragment
from RTF and replace with NodeList. Remove duplicate Boolean from both. Fix
Boolean conversion to make java.lang.Boolean higher than string.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/19/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/lib/sql ColumnHeader.java
RowSet.java XStatement.java<br/><ref>Committer's log entry: </ref>Use null nodetest to mean the same as "node()". This fixes a bug reported
by "Voytenko, Dimitry" &lt;DVoytenko@SECTORBASE.COM&gt;
where &lt;xsl:copy-of select="sql:query(...)"/&gt;
crashes with NullPointerException, i.e.
there are cases where we really don't want
to set the NodeTest.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>02/20/2001<br/><ref>Modified: </ref>java/src/org/apache/xpath/compiler XPathParser.java<br/><ref>Committer's log entry: </ref>Check for null token before checking if it is a letter<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/20/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer
TransformerIdentityImpl.java<br/><ref>Committer's log entry: </ref>Fix made for bug reported by "Glencross, Christian"
&lt;Christian.Glencross@gs.com&gt;
on 02/16/2001 10:18 AM.
Xerces 1.2.3 SAX parser calls
handler.setDocumentLocator() before handler.startDocument().
TransformerIdentityImpl.m_resultContentHandler isn't initialised until
TransformerIdentityImpl.startDocument() is called.
Added lazy construction of result handler
in setDocumentLocator, in addition to
startDocument.<br/><br/></li><li><ref>Committed by </ref>garyp@apache.org<ref> on </ref>02/21/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/lib Extensions.java<br/><ref>Committer's log entry: </ref>Correct implementation of string value of a node.<br/><br/></li><li><ref>Committed by </ref>dleslie@apache.org<ref> on </ref>02/21/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/lib/sql Column.java
ColumnAttribute.java ColumnData.java
ColumnHeader.java Row.java RowSet.java
StreamableNode.java XConnection.java
XStatement.java package.html<br/><ref>Committer's log entry: </ref>Added experimental usage metatag to all classes in this package,
and an explanatory note to package.html.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/22/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/stree ElementImpl.java<br/><ref>Committer's log entry: </ref>Bug fix attributed to Norman Walsh &lt;ndw@nwalsh.com&gt;, on
02/20/2001 09:50 AM. if the attribute 'name' doesn't occur in the AttList,
the
result of getIndex(name) is -1, but
getChildAttribute() would incorrectly
return the first attribute. Fix returns
null if index &lt; 0.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>02/22/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/serialize SerializerToXML.java
java/src/org/apache/xalan/transformer
TransformerIdentityImpl.java<br/><ref>Committer's log entry: </ref>Implement DeclHandler for identity transforms<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>02/22/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer TransformerImpl.java<br/><ref>Committer's log entry: </ref>Fix for bug originally reported by Daryl Beattie &lt;DarylB@screamingmedia.com&gt;
on 02/14/2001 04:16 PM. A hang was occuring inside the use
of a Result Tree Fragment. When the result tree fragement was
being created, the Redirect extension was being called, which
called createResultContentHandler which set the ContentHandler
in the Transformer, but not in the ResultTreeHandler. Then, Redirect
called Transformer#executeChildTemplates(
ElemTemplateElement elem, Node sourceNode, QName mode,
ContentHandler handler)
which saves the reference to the original content handler in
the transformer, and then sets the new one by calling setContentHandler,
which sets the ContentHandler in the ResultTreeHandler as well
as the Transformer. When it tried to restore the old ContentHandler,
it restored the value in the ResultTreeHandler to a Serializer, instead
of the correct ContentHandler. When transformToRTF then called
endDocument on it's resultTreeFragment, the event was sent
to the Serializer instead of the SourceTreeHandler, and thus the
isComplete flag was not set, and thus the hang. (whew!)
The fix is in executeChildTemplates save the value of the
resultTreeHandler's contentHandler as well as Transformer's
content handler, and restore them both. A more architectual fix
could be made, but not without high risk, so I think this is the best
and safest way to fix it.<br/><br/></li><li><ref>Committed by </ref>dleslie@apache.org<ref> on </ref>02/23/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/res XSLTInfo.properties<br/><ref>Committer's log entry: </ref>Changed version to 2.0.1<br/><br/></li><li><ref>Committed by </ref>dleslie@apache.org<ref> on </ref>02/23/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/processor XSLProcessorVersion.java<br/><ref>Committer's log entry: </ref>Changed version to 2.0.1<br/><br/></li><li><ref>Committed by </ref>curcuru@apache.org<ref> on </ref>02/28/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/res XSLTErrorResources.java<br/><ref>Committer's log entry: </ref>Update text of error messages
Submitted by: Andreas Zehnpfund<br/><br/></li><li><ref>Committed by </ref>curcuru@apache.org<ref> on </ref>02/28/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/xslt Process.java<br/><ref>Committer's log entry: </ref>Update printArgOptions() with better text and to better reflect actual
options that are currently supported; catch missing -IN argument<br/><br/></li><li><ref>Committed by </ref>jkesselm@apache.org<ref> on </ref>03/05/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/client XSLTProcessorApplet.java
java/src/org/apache/xalan/processor StylesheetHandler.java
TransformerFactoryImpl.java
java/src/org/apache/xalan/stree DocImpl.java
StreeDOMBuilder.java TextImpl.java
java/src/org/apache/xalan/templates OutputProperties.java
java/src/org/apache/xalan/xslt Process.java
java/src/org/apache/xml/utils FastStringBuffer.java
java/src/trax trax.properties<br/><ref>Committer's log entry: </ref>New approach to FastStringBuffer, and changes needed to support it.
We still need to do some serious work on both the initial values of the
tuning parameters and the heuristics driving the "chunk growth" algorithms.
Currently set for fixed-sized chunks of 8Kch in main tree, .5Kch in RTF.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/06/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/templates ElemElement.java
ElemForEach.java ElemLiteralResult.java
java/src/org/apache/xalan/transformer
ClonerToResultTree.java QueuedSAXEvent.java
QueuedStartDocument.java QueuedStartElement.java
ResultTreeHandler.java TransformerImpl.java
TreeWalker2Result.java<br/><ref>Committer's log entry: </ref>Fix for http://nagoya.apache.org/bugzilla/show_bug.cgi?id=741.
1) ResultTreeHandler now implements the TransformState interface.
2) Queued state such as the current node and the current template is stored
as part of QueuedStartElement. Storage will only occur if the ContentHandler
implements TransformClient.
3) When state is requested (for instance TransformState#getCurrentElement()),
if the queued element is null or not pending (for instance, in a characters
event), it will get the state from the transformer, otherwise it will get the
state from the queued element.
Other fixes were attempted for this problem, including trying to
get rid of queueing altogether, and flushing a bit earlier before
the state was pushed on the various stacks, but both of
these had show-stopping issues (see discussions
on xalan-dev).
Note that for the moment the ContextNodeList is node
cloned as it needs to be in order for
TransformState#getContextNodeList.<br/><br/></li><li><ref>Committed by </ref>garyp@apache.org<ref> on </ref>03/06/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/templates ElemParam.java
java/src/org/apache/xpath Arg.java VariableStack.java<br/><ref>Committer's log entry: </ref>The field Arg.isParamVar was attempting to serve two functions: to indicate
variable Frame entries which are not currently activated and to indicate Frames
containing parameters passed with xsl:with-param. When processing was finished
for a node in a node-set, the isParamVar flag was turned on to indicate the
Frame slot was available. Unfortunately, this also indicated that the item was
passed as a parameter which it wasn't. This fix changes isParamVar into to
fields, isAvailable which indicates that the slot is available and
isFromWithParam indicating the Frame slot came from an xsl:with-param or a
top-level parameter passed in via the tranformerImpl.setParameter() API.
I have tested this change against the conformance suite and had no
regression. I've also submitted a test case which fails on the existing
codebase but works okay after this fix.
It is possible that I've missed something with regard to the API setParameter
calls but we can fix those if problems are reported.<br/><br/></li><li><ref>Committed by </ref>garyp@apache.org<ref> on </ref>03/07/2001<br/><ref>Modified: </ref>java/src/org/apache/xml/utils FastStringBuffer.java<br/><ref>Committer's log entry: </ref>Correct operation when length of content to be appended is zero.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>03/07/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/serialize SerializerToXML.java<br/><ref>Committer's log entry: </ref>Fix closing out doctype declaration<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>03/08/2001<br/><ref>Modified: </ref>java/src/org/apache/xml/utils SystemIDResolver.java<br/><ref>Committer's log entry: </ref>Change SystemIdResolver to default to user.dir if the base URI is null<br/><br/></li><li><ref>Committed by </ref>garyp@apache.org<ref> on </ref>03/09/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer TransformerImpl.java
java/src/org/apache/xpath VariableStack.java<br/><ref>Committer's log entry: </ref>Parameters set with setParameter were available to stylesheet as variable
references ($myParam) even though there was no xsl:param element to receive it.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>03/09/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer
TransformerIdentityImpl.java<br/><ref>Committer's log entry: </ref>Check if there is a DeclHandler before calling it.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xml/utils WrappedRuntimeException.java<br/><ref>Committer's log entry: </ref>Patch attributed to Patrick Moore &lt;patrickm@rioport.com&gt; on 03/09/2001.
Adds another constructor to pass in the error message.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/templates ElemAttribute.java
ElemElement.java<br/><ref>Committer's log entry: </ref>Checkin addresses http://nagoya.apache.org/bugzilla/show_bug.cgi?id=923.
elemAttribute now derives from elemElement so the basic name resolution
code can be shared. Breaks attribset24 test, but I think the newer
behavior is better. New virtual methods overloaded by elemAttribute are
constructNode, resolvePrefix, and validateNodeName. Also, in the
elemAttribute#execute method, checks are made to make sure an
element is pending.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xml/utils SystemIDResolver.java<br/><ref>Committer's log entry: </ref>Added getAbsoluteURI(String url), and merge
with Myriam's changes.
Part of fix for problem found when
investigating http://nagoya.apache.org/bugzilla/show_bug.cgi?id=906.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/processor
TransformerFactoryImpl.java<br/><ref>Committer's log entry: </ref>Call getAbsoluteURI(String url) for the source URL.
Fix for problem found when
investigating http://nagoya.apache.org/bugzilla/show_bug.cgi?id=906.
This tries to force us always having an absolute URL in the processing
stack as the base URL, which should be OK, I hope.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer TransformerImpl.java<br/><ref>Committer's log entry: </ref>Call getAbsoluteURI(String url) for the source URL.
Fix for problem found when
investigating http://nagoya.apache.org/bugzilla/show_bug.cgi?id=906.
This tries to force us always having an absolute URL in the processing
stack as the base URL, which should be OK, I hope.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer QueuedEvents.java
QueuedStartElement.java ResultTreeHandler.java<br/><ref>Committer's log entry: </ref>The user for http://nagoya.apache.org/bugzilla/show_bug.cgi?id=741 reported
problems on testing, so these changes are a re-fix. He tested and
everything seems OK now. There actually may be a slight performance
improvement involved here.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/serialize SerializerToHTML.java<br/><ref>Committer's log entry: </ref>Applied patches from dmitri.ilyin@memiq.com (Dmitri Ilyin)
from http://nagoya.apache.org/bugzilla/show_bug.cgi?id=705.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xpath XPathAPI.java<br/><ref>Committer's log entry: </ref>Applied patch submitted by nboyd@atg.com (Norris Boyd)
at http://nagoya.apache.org/bugzilla/show_bug.cgi?id=702.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/serialize Encodings.java<br/><ref>Committer's log entry: </ref>Applied patch submitted by havardw@underdusken.no (H嶡rd Wigtil).
Also added "XXX-X" variants for all "XXX_X" java encoding names.
I'm not totally confident that this is the right thing to do, but I can't
see that it will hurt, except to make the table a bit larger. I
would prefer to be safe and make sure we handle the encoding.
See my comments in http://nagoya.apache.org/bugzilla/show_bug.cgi?id=718.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/templates ElemTemplateElement.java
StylesheetRoot.java<br/><ref>Committer's log entry: </ref>Minor changes to better bottleneck throwing of Runtime exceptions
during processing.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/processor
TransformerFactoryImpl.java<br/><ref>Committer's log entry: </ref>Catch all exceptions thrown when processing stylesheet, and send
them to the error listener. There's probably some danger of having
the same error sent to the error listener multiple times, but better too
many reports, than none, I guess.
This addresses http://nagoya.apache.org/bugzilla/show_bug.cgi?id=906.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/lib/sql XConnection.java
XStatement.java<br/><ref>Added: </ref>java/src/org/apache/xalan/lib/sql ConnectionPool.java
DefaultConnectionPool.java ExtensionError.java
PooledConnection.java QueryParameter.java
SQLExtensionError.java XConnectionPoolManager.java<br/><ref>Committer's log entry: </ref>These are John Gentilin &lt;johnglinux@eyecatching.com&gt;
patches for connection pooling and parameterized
queries. These should be considered to be unstable
right now, as we are still working on some things.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/11/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/processor ProcessorInclude.java
TransformerFactoryImpl.java
java/src/org/apache/xalan/serialize SerializerToXML.java
java/src/org/apache/xalan/stree StreeDOMHelper.java
java/src/org/apache/xalan/transformer ResultTreeHandler.java
TransformerIdentityImpl.java TreeWalker2Result.java
java/src/org/apache/xml/utils AttList.java TreeWalker.java
java/src/org/apache/xpath DOM2Helper.java XPathContext.java<br/><ref>Committer's log entry: </ref>The DOM2Helper#isNodeAfter(Node node1, Node node2) method
has been fixed so that it no longer does the try/catch thing if one
of the nodes doesn't implement DOMOrder, but instead does an
instanceof test. In StreeDOMHelper, it overloads this method and
*does* do the try/catch business, since almost always both nodes
will implement DOMOrder in this case, and this will be faster than
an instanceof test. Also, in various classes, I did some stuff to try
and make sure that a DOM2Helper wasn't being created and used
when a StreeDOMHelper is needed.
This addresses http://nagoya.apache.org/bugzilla/show_bug.cgi?id=800
and should give a good performance fix for foreign DOM processing.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/12/2001<br/><ref>Modified: </ref>java/src/org/apache/xpath/patterns NodeTest.java<br/><ref>Committer's log entry: </ref>Xerces at some point decided to use "" instead
of null for null namespaces. There has been a
discussion between Gary Peskin in
Joe Kessleman on xalan-dev about this,
but I hadn't been fully keeping up the the
thread that well, and missed it's relation to
this problem. I include some of the discussion
at the end of this note. I made Xalan be able to
compare a "" namespace to null for now, until
we get this resolved.
The gist of the discussion on xalan-dev regarding this is:
&gt;&gt;1. Declare the Xerces-J support of schemas to have a bug and ask that
&gt;&gt;Xerces be corrected to always use a null namespace URI to indicate that
&gt;&gt;there is no default namespace. Even if the Xerces people change this
&gt;&gt;behavior, is this correct?
&gt;
&gt; Yes. If your description of the problem is accurate (you should probably
&gt; submit a more detailed case so it can be reproduced in the lab), this is a
&gt; parser/DOM-builder bug.<br/><br/></li><li><ref>Committed by </ref>costin@apache.org<ref> on </ref>03/12/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/lib/sql ExtensionError.java<br/><ref>Committer's log entry: </ref>Removed ( commented out ) dump() method and the imports in ExtensionError.
So far the method doesn't seem to be used ( no warning in the compile ).
The problem is that this method is breaking the build with crimson ( since
it uses xerces-specific classes ). It is possible to implement it on top
of the serialization classes that are part of xalan - if someone needs the
method I'll try to port it.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/13/2001<br/><ref>Modified: </ref>java/src/org/apache/xml/utils TreeWalker.java<br/><ref>Committer's log entry: </ref>Added back in the TreeWalker(ContentHandler contentHandler)
constructor, because I'm worried I'll break more dependent code.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>03/13/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/res XSLTErrorResources.java
java/src/org/apache/xalan/xslt Process.java<br/><ref>Committer's log entry: </ref>Implement new arguments for the command line interface: URIResolver,
EntityResolver and ContentHandler<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>03/13/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/templates FuncFormatNumb.java<br/><ref>Committer's log entry: </ref>Fix error message to say that 2 or 3 arguments are required.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>03/13/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/processor ProcessorLRE.java
java/src/org/apache/xalan/res XSLTErrorResources.java<br/><ref>Committer's log entry: </ref>Better error message for missing or incorrect XSLT namespace declaration in a
stylesheet<br/><br/></li><li><ref>Committed by </ref>garyp@apache.org<ref> on </ref>03/13/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/lib Redirect.java
java/src/org/apache/xalan/transformer TransformerImpl.java
java/src/org/apache/xalan/xslt Process.java<br/><ref>Committer's log entry: </ref>Remember the Result that was used to trigger the transform. Access that
result from the Redirect extension to make file references in Redirect relative
to the original result URI.
If this is not available, references are relative to the source URI.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/14/2001<br/><ref>Modified: </ref>java/src/org/apache/xpath VariableStack.java<br/><ref>Committer's log entry: </ref>Added protection for null pointer exception that I discovered when
running some Cocoon tests. Since I've never seen this before,
I assume this is related to the changes that Gary made, but am
unsure as it's 4:00 in the morning and I'm too tired to look into it deeply.<br/><br/></li><li><ref>Committed by </ref>curcuru@apache.org<ref> on </ref>03/14/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/xslt Process.java<br/><ref>Committer's log entry: </ref>Remove check for missing -IN arg; there are a number of use
cases for calling Process.main without an XML document<br/><br/></li><li><ref>Committed by </ref>costin@apache.org<ref> on </ref>03/14/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/xslt Process.java<br/><ref>Committer's log entry: </ref>A (last ? ) place where XMLReaderFactory was used without
trying jaxp first. I used the same code that is used in all other
places in xalan.
With this change, the parser defined in XSLTInfo.properties will be used
only if jaxp is not available.<br/><br/></li><li><ref>Committed by </ref>dleslie@apache.org<ref> on </ref>03/14/2001<br/><ref>Modified: </ref>java/src/org/apache/xml/utils StringVector.java<br/><ref>Committer's log entry: </ref>Added missing @serial Javadoc tags.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/15/2001<br/><ref>Modified: </ref>java/src/org/apache/xalan/lib/sql ConnectionPool.java
DefaultConnectionPool.java ExtensionError.java
SQLExtensionError.java XConnection.java
XConnectionPoolManager.java XStatement.java<br/><ref>Committer's log entry: </ref>Update from John Gentilin &lt;johnglinux@eyecatching.com&gt; to
fix connection cleanup.<br/><br/></li></ul><p>Compatibility source code updates:</p><ul><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>02/02/2001<br/><ref>Modified: </ref>java/compat_src/org/apache/xalan/xslt XSLTInputSource.java
XSLTResultTarget.java<br/><ref>Committer's log entry: </ref>Implement some more methods for compatibility<br/><br/></li><li><ref>Committed by </ref>dleslie@apache.org<ref> on </ref>02/02/2001<br/><ref>Modified: </ref>java/compat_src/org/apache/xalan/xslt XSLTInputSource.java<br/><ref>Committer's log entry: </ref>Fixed javadoc for api that was just added back.<br/><br/></li><li><ref>Committed by </ref>dleslie@apache.org<ref> on </ref>02/02/2001<br/><ref>Modified: </ref>java/compat_src/org/apache/xalan/xslt XSLTResultTarget.java<br/><ref>Committer's log entry: </ref>Fixed javadoc for api that was just added back.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>02/02/2001<br/><ref>Modified: </ref>java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java<br/><ref>Committer's log entry: </ref>Fix problem with calling the processor with a liaison<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>02/02/2001<br/><ref>Modified: </ref>java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java<br/><ref>Committer's log entry: </ref>Fix problem where source file was being parsed more than once and if using an
input stream, we would get a read error<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>02/12/2001<br/><ref>Modified: </ref>java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java<br/><ref>Committer's log entry: </ref>Set system id in stylesheet handler<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>02/14/2001<br/><ref>Modified: </ref>java/compat_src/org/apache/xalan/xslt XSLTInputSource.java<br/><ref>Committer's log entry: </ref>Call local setSystemId.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>02/15/2001<br/><ref>Modified: </ref>java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java<br/><ref>Committer's log entry: </ref>Fix problem with processing an input source created from a reader with no
systemId
Fix problem with reading an input source file twice if it has a PI<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>02/22/2001<br/><ref>Modified: </ref>java/compat_src/org/apache/xalan/xslt StylesheetRoot.java<br/><ref>Committer's log entry: </ref>Add getOutputMethod API.<br/><br/></li><li><ref>Committed by </ref>dleslie@apache.org<ref> on </ref>03/07/2001<br/><ref>Modified: </ref>java/compat_src/org/apache/xalan/xpath/xml
XMLParserLiaisonDefault.java<br/><ref>Committer's log entry: </ref>Put in Apache copyright.<br/><br/></li><li><ref>Committed by </ref>sboag@apache.org<ref> on </ref>03/13/2001<br/><ref>Modified: </ref>java/compat_src/org/apache/xalan/xpath/xml TreeWalker.java
java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java<br/><ref>Committer's log entry: </ref>Made changes for change to API for XalanJ2 TreeWalker, which
now requires that the DOM helper be created by the caller.</li>
</ul>
</s3>
<s3 title="Changes for &xslt4j; version 2.0.0">
<p>Release 2.0 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 <resource-ref idref="bsf"/> release candidate 2.2, which fixes a bug running JPython extensions.</p>
<p><em>Core bug fixes:</em></p>
<ul>
<li>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).<br/><br/></li>
<li>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.<br/><br/></li>
<li>Fixed a problem with null namespace being passed from xsl:element. This bug also surfaced while processing DocBook
stylesheets.<br/><br/></li>
<li>In the interest of stability, we now treat "unknown error in XPath" as a fatal error.<br/><br/></li>
<li>Added support in stylesheet processing instructions for "text/xml" and "application/xml+xslt" mime types.<br/><br/></li>
<li>Fixed tokenizing of stylesheet processing instructions to allow parameters to be passed to server in href attributes.<br/><br/></li>
<li>Fixed a bug passing Transformer creation error messages to ErrorListener when an ErrorListener has been set on
TransformerFactory.<br/><br/></li>
<li>When using an Exception to instantiate a FactoryConfigurationError (extends Error), we now propagate the Exception message to
super().<br/><br/></li>
<li>Added defensive code to ElemTemplateElement for handling a null URI.<br/><br/></li>
<li>When using an Exception to instantiate a TransformerException (extends Exception), we now propagate the Exception message to super()
rather than a generic message.<br/><br/></li>
<li>Fixed a bug (the generation of an unwanted entity reference) performing the identity transformation
(see <link idref="usagepatterns" anchor="serialize">Serializing output</link>) with an XML document containing a DOCTYPE
declaration.<br/><br/></li>
<li>Message manager modified so that the SourceLocator must always be passed in,
which will make a major difference in getting line number information.<br/><br/></li>
<li>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.<br/><br/></li>
<li>Bug fixed with namespace contexts in the stylesheet processor.
The bug could cause &lt;a xmlns:a="x"&gt;&lt;b&gt; to produce &lt;a xmlns:a="x"&gt;&lt;b xmlns:a="x"&gt;.<br/><br/></li>
<li>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".<br/><br/></li>
<li>In TransformerException, check that the cause != null when checking for a contained exception.<br/><br/></li>
<li>Fixed a problem validating non-namespaced attributes and a problem allowing non-namespaced attributes to be children of the
stylesheet element.<br/><br/></li>
<li>Fixed checking of number of arguments in document() function.<br/><br/></li>
<li>Fixed problem with mutation of templates at run time. Templates resolution now takes place during the compose() method.<br/><br/></li>
<li>Fixed some minor threading issues in org.apache.xalan.stree (Child, Parent, ElementImpl, SourceTreeHandler).<br/><br/></li>
<li>Synchronized TrAX API functions subject to mutation to prevent mutation during a transformation.<br/><br/></li>
<li>Fixed bug reported by Jano Elovirta: substring() was returning an error if the start index is larger than the string.<br/><br/></li>
<li>Set StringKey.toString() to return the underlying String (m_str), thus avoiding a potential symmetry problem with the equals() method
reported by Ito Kazumitsu.<br/><br/></li>
<li>In response to note from Ito Kazumitsu, changed Java encoding name "EUCJIS" in FormatterToXML to "EUC_JP".<br/><br/></li>
<li>When Xalan creates a FileOutputStream, it now closes the stream before exiting.<br/><br/></li>
<li>Fixed handling of an exception that can be thrown while building a DOM.<br/><br/></li>
<li>Fixed a problem reported by Dimitry Voytenko serializing compiled stylesheets.<br/><br/></li>
<li>For support of applets, modified TransformerFactory System.getProperty() calls to catch SecurityExceptions.<br/><br/></li>
<li>Fixed a bug reported by Krishna Mohan Meduri setting output properties.<br/><br/></li>
<li>Fixed error recovery when xsl:element encounters a bad name or unresolvable prefix.<br/><br/></li>
<li>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<br/><br/></li>
<li>Fixed bug with cloned iterators reported by Tim Sean.<br/><br/></li>
<li>Fixed null pointer exception that could occur with getValue("xxx").<br/><br/></li>
<li>Fixed bug reported by Tim Sean handling the xml:space attribute.</li>
</ul>
<p><em>Bug fixes in the <link idref="usagepatterns" anchor="compat">Xalan-Java 1 compatibility API</link>:</em></p>
<ul>
<li>Fixed ProblemListener (for processing error messages) to derive from &xslt4j; 2 ErrorHandler.<br/><br/></li>
<li>Fixed evaluation of stylesheet string parameters to conform to &xslt4j; 1 behavior (expressions for &xslt4j; 1 vs. String objects
for &xslt4j; 2).<br/><br/></li>
<li>Added XPathSupport and XPathSupportDefault, and fixed the derivation of XObject sub-types (XString, etc.).<br/><br/></li>
<li>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.</li>
</ul>
<p>For a list of tasks in the &xslt4j2; To-Do list that have been completed, see <jump href="todo.html#release-date-completed">Tasks completed</jump>.</p>
</s3>
<s3 title="Changes for &xslt4j; version 2.0.D07">
<p>&xslt4j; 2.0.D07 incorporates a <link idref="usagepatterns" anchor="compat">Xalan-Java 1 compatibility jar</link>, some performance enhancements, and a number of bug fixes for bugs found in version 2.0.D06.</p>
<ul>
<li>Fixed handling of disable-output-escaping="no". Previously, once it was turned on, it could not be turned off.<br/><br/></li>
<li>Fixed a bug with whitespace handling where Xalan was incorrectly checking for whitespace
stripping before collation of multiple whitespace events into a single text node.<br/><br/></li>
<li>Whitespace stripping wasn't working with input DOMs before. This is now fixed.<br/><br/></li>
<li>Fixed many exception handling problems and problems with error reporting.<br/><br/></li>
<li>Fixed a bug resetting parameters in Transformer clearParameters().<br/><br/></li>
<li>Fixed a bug where CDATA sections were not matching the text() node test.<br/><br/></li>
<li>Made better memory allocation problem with result tree fragments.<br/><br/></li>
<li>Made result tree fragment parsing of numbers consistent with strings.<br/><br/></li>
<li>Exceptions thrown from extensions should now be properly reported via the error listener.<br/><br/></li>
<li>Fixed hard-coded stack dump set off by m_reportInPostExceptionFromThread variable.<br/><br/></li>
<li>Fixed intermittent threading problem with text nodes being dropped.<br/><br/></li>
<li>Fixed problem with variable evaluation inside of union expressions.</li>
</ul>
</s3>
<s3 title="Changes for &xslt4j; version 2.0.D06">
<p>We have fixed the bugs reported in &xslt4j; 2.0.D05. Along with several other enhancements,
we have also fixed a number of bugs found by testing and our users:</p>
<ul>
<li>Fixed some threading problems and improved support for handling Exceptions thrown in a secondary thread.<br/><br/>
Note: To support incremental output, &xslt4j; performs the transformation in a second thread while building the source tree in the main thread.<br/><br/></li>
<li>Fixed problems encountered in piping (utilizing transformation output as input for another transformation).<br/><br/></li>
<li>Fixed problems handling attributes and adding attributes to result tree.<br/><br/></li>
<li>Added defensive checking for null entities, null namespaces, and empty strings passed in for URIs and local names.<br/><br/></li>
<li>We now conform to the SAX convention of representing null namespaces with empty strings.<br/><br/></li>
<li>Fixed a bug encountered evaluating a variable in a predicate expression applied to child nodes.<br/><br/></li>
<li>Changed names of serializers from FormatterTo<ref>Xxx</ref> to SerializerTo<ref>Xxx</ref>. See
<jump href="apidocs/org/apache/xalan/serialize/package-summary.html">Package org.apache.xalan.serialize</jump>.<br/><br/></li>
<li>Improved debugging support in a number of areas.</li>
</ul>
</s3>
<s3 title="Changes for &xslt4j; version 2.0.D05">
<p>All of the bugs reported in &xslt4j; 2.0.D01 have been fixed. The remainder of this section discusses two changes that we believe are of particular importance:</p>
<p><em>TrAX</em></p>
<p>The Transformation API for XML (TrAX) that &xslt4j2; implements has undergone substantial revisions since the release of &xslt4j; 2.0.D01. TrAX has joined the Java API for XML Parsing (JAXP) as part of the Sun&reg; <resource-ref idref="jsr063"/>. Accordingly, the TrAX package names have changed. The conceptual organization has also changed somewhat: The primary transformation interfaces are defined in javax.xml.transform, with concrete classes for managing stream input/output, SAX parsers and ContentHandler, and DOM parsers and DOM trees in javax.xml.transform.stream, javax.xml.transform.sax, and javax.xml.transform.dom. For more information, see <resource-ref idref="trax"/>, and review <link idref="usagepatterns">Usage Patterns</link>.</p>
<anchor name="outputprops"/><p><em>Output properties</em></p>
<p>The handling of xsl:output properties has changed: org.apache.xalan.serialize.OutputFormat and apache.xalan.templates.OutputFormatExtended were removed and replaced with org.apache.xalan.templates.OutputProperties. The SerializerFactory getSerializer() method now takes Properties rather than a String indicating the output method. You can replace <code>getSerializer("xml")</code>, for example, with <code>getSerializer(OutputProperties.getDefaultMethodProperties("xml"))</code>.</p>
<p>HTML, XML, and text xsl:output properties are specified in property files in org.apache.xalan.templates: output_html.properties, output_xml.properties, and output_text.properties.</p>
<p>You can start using the output properties defined in these files in your stylesheets. For example, you can turn URL escaping off in HTML output with<br/><code>{http\u003a//xml.apache.org/xslt}use-url-escaping=no</code><br/>
and you can control indenting with<br/>
<code>{http\u003a//xml.apache.org/xslt}indent-amount=<ref>n</ref></code></p>
<note>The colon after the "http" protocol must be escaped.</note>
<p>Character-to-entity mapping is specified in org.apache.xalan.serialize: HTMLEntities.res and XMLEntities.res. You can override entity ref
mapping from a stylesheet. For example:</p>
<source>&lt;?xml version="1.0"?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xslt" version="1.0"&gt;
&lt;xsl:output xalan:entities="myentities.ent"/&gt;
&lt;xsl:template match="/"&gt;
&lt;out&gt;&amp;#125;&lt;/out&gt;
&lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;</source>
<p>=== myentities.ent ===</p>
<source>quot 34
amp 38
lt 60
gt 62
lala 125</source>
<p>The output is:</p>
<source>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;out&gt;&amp;lala;&lt;/out&gt;</source>
<p>See also <link idref="usagepatterns" anchor="outputprops">Setting output properties in your stylesheets</link>.</p>
</s3>