


























|
Xalan-Java version 2.0.1
| |
 |  |  |  | Changes since Xalan-Java 2.0.0 |  |  |  |  |
| |
This release includes a number of bug fixes to the Xalan-Java and TrAX core and Xalan-Java 1 compability API. We have also
- Entered all known Xalan-Java 2 bugs in the Apache Bugzilla database
- Added support for using custom URIResolver, EntityResolver, and ContentHandler implementations with the command-line utility
- Upgraded from Ant 1.2 to Ant 1.3 for our builds (the new ant.jar is in the bin directory).
Core source code updates: - Committed by sboag@apache.org on 02/06/2001
Modified: java/src/org/apache/xpath/axes ChildWalkerMultiStep.java Committer's log entry: Fix for bug reported by "Chris P. McCabe" <chris_mccabe@choicehotels.com>
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.
- Committed by sboag@apache.org on 02/06/2001
Modified: java/src/org/apache/xalan/transformer TransformerImpl.java Committer's log entry: Fixes for exceptions being thrown that weren't being passed through
the error listener.
- Committed by sboag@apache.org on 02/07/2001
Modified: java/src/org/apache/xpath/axes FollowingWalker.java Committer's log entry: Fix for bug reported by Dave Haffner <dave.haffner@xmls.com>
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.
- Committed by sboag@apache.org on 02/07/2001
Modified: java/src/org/apache/xpath/axes PrecedingWalker.java Committer's log entry: Fix for bug reported by Dave Haffner <dave.haffner@xmls.com>
02/06/2001 04:03 AM
In nextSibling(), don't return null if isAncestorOfRootContext, instead
do next.getFirstChild().
- Committed by sboag@apache.org on 02/07/2001
Modified: java/src/org/apache/xpath SourceTreeManager.java Committer's log entry: Fix for bug reported by anders.domeij@uc.se
02/07/2001 09:35 AM
removed extra bogus TransformerException decl in resolveURI
- Committed by sboag@apache.org on 02/08/2001
Modified: java/src/org/apache/xalan/stree SourceTreeHandler.java Committer's log entry: Fix bug reported by Jason Harrop <jharrop@bigpond.net.au>
02/07/2001 08:12 PM
Don't process comment or whitespace events if inside a startDTD/endDTD
event.
- Committed by sboag@apache.org on 02/10/2001
Modified: java/src/org/apache/xpath/axes WalkerFactory.java Committer's log entry: In indirect response to bug posted by "Thee Boon Hoo" <theebh@newstakes.com>
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.
- Committed by mmidy@apache.org on 02/12/2001
Modified: java/src/org/apache/xalan/processor StylesheetPIHandler.java
TransformerFactoryImpl.java Committer's log entry: Patch for Dmitri IIyin to use the specified URIResolver.
- Committed by mmidy@apache.org on 02/12/2001
Modified: java/src/org/apache/xalan/templates ElemNumber.java Committer's log entry: Number Expression should be evaluated then rounded up.
- Committed by sboag@apache.org on 02/13/2001
Modified: java/src/org/apache/xalan/xslt Process.java Committer's log entry: Create a document fragment for the output node, for -flavor d2d.
- Committed by sboag@apache.org on 02/13/2001
Modified: java/src/org/apache/xpath/compiler Compiler.java Committer's log entry: Better error message when quo is used.
- Committed by mmidy@apache.org on 02/13/2001
Modified: 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 Committer's log entry: Remove extra method/call to TransformerImpl.executeChildTemplates()
- Committed by sboag@apache.org on 02/13/2001
Modified: java/src/org/apache/xpath/patterns NodeTest.java Committer's log entry: 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" <mhkay@iclway.co.uk>,
02/08/2001 08:57 AM.
- Committed by sboag@apache.org on 02/13/2001
Modified: java/src/org/apache/xalan/lib/sql ColumnData.java Committer's log entry: 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" <mhkay@iclway.co.uk>,
02/08/2001 08:57 AM.
- Committed by garyp@apache.org on 02/19/2001
Modified: java/src/org/apache/xalan/extensions MethodResolver.java Committer's log entry: 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.
- Committed by sboag@apache.org on 02/19/2001
Modified: java/src/org/apache/xalan/lib/sql ColumnHeader.java
RowSet.java XStatement.java Committer's log entry: Use null nodetest to mean the same as "node()". This fixes a bug reported
by "Voytenko, Dimitry" <DVoytenko@SECTORBASE.COM>
where <xsl:copy-of select="sql:query(...)"/>
crashes with NullPointerException, i.e.
there are cases where we really don't want
to set the NodeTest.
- Committed by mmidy@apache.org on 02/20/2001
Modified: java/src/org/apache/xpath/compiler XPathParser.java Committer's log entry: Check for null token before checking if it is a letter
- Committed by sboag@apache.org on 02/20/2001
Modified: java/src/org/apache/xalan/transformer
TransformerIdentityImpl.java Committer's log entry: Fix made for bug reported by "Glencross, Christian"
<Christian.Glencross@gs.com>
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.
- Committed by garyp@apache.org on 02/21/2001
Modified: java/src/org/apache/xalan/lib Extensions.java Committer's log entry: Correct implementation of string value of a node.
- Committed by dleslie@apache.org on 02/21/2001
Modified: 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 Committer's log entry: Added experimental usage metatag to all classes in this package,
and an explanatory note to package.html.
- Committed by sboag@apache.org on 02/22/2001
Modified: java/src/org/apache/xalan/stree ElementImpl.java Committer's log entry: Bug fix attributed to Norman Walsh <ndw@nwalsh.com>, 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 < 0.
- Committed by mmidy@apache.org on 02/22/2001
Modified: java/src/org/apache/xalan/serialize SerializerToXML.java
java/src/org/apache/xalan/transformer
TransformerIdentityImpl.java Committer's log entry: Implement DeclHandler for identity transforms
- Committed by sboag@apache.org on 02/22/2001
Modified: java/src/org/apache/xalan/transformer TransformerImpl.java Committer's log entry: Fix for bug originally reported by Daryl Beattie <DarylB@screamingmedia.com>
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.
- Committed by dleslie@apache.org on 02/23/2001
Modified: java/src/org/apache/xalan/res XSLTInfo.properties Committer's log entry: Changed version to 2.0.1
- Committed by dleslie@apache.org on 02/23/2001
Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java Committer's log entry: Changed version to 2.0.1
- Committed by curcuru@apache.org on 02/28/2001
Modified: java/src/org/apache/xalan/res XSLTErrorResources.java Committer's log entry: Update text of error messages
Submitted by: Andreas Zehnpfund
- Committed by curcuru@apache.org on 02/28/2001
Modified: java/src/org/apache/xalan/xslt Process.java Committer's log entry: Update printArgOptions() with better text and to better reflect actual
options that are currently supported; catch missing -IN argument
- Committed by jkesselm@apache.org on 03/05/2001
Modified: 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 Committer's log entry: 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.
- Committed by sboag@apache.org on 03/06/2001
Modified: 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 Committer's log entry: 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.
- Committed by garyp@apache.org on 03/06/2001
Modified: java/src/org/apache/xalan/templates ElemParam.java
java/src/org/apache/xpath Arg.java VariableStack.java Committer's log entry: 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.
- Committed by garyp@apache.org on 03/07/2001
Modified: java/src/org/apache/xml/utils FastStringBuffer.java Committer's log entry: Correct operation when length of content to be appended is zero.
- Committed by mmidy@apache.org on 03/07/2001
Modified: java/src/org/apache/xalan/serialize SerializerToXML.java Committer's log entry: Fix closing out doctype declaration
- Committed by mmidy@apache.org on 03/08/2001
Modified: java/src/org/apache/xml/utils SystemIDResolver.java Committer's log entry: Change SystemIdResolver to default to user.dir if the base URI is null
- Committed by garyp@apache.org on 03/09/2001
Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
java/src/org/apache/xpath VariableStack.java Committer's log entry: Parameters set with setParameter were available to stylesheet as variable
references ($myParam) even though there was no xsl:param element to receive it.
- Committed by mmidy@apache.org on 03/09/2001
Modified: java/src/org/apache/xalan/transformer
TransformerIdentityImpl.java Committer's log entry: Check if there is a DeclHandler before calling it.
- Committed by sboag@apache.org on 03/11/2001
Modified: java/src/org/apache/xml/utils WrappedRuntimeException.java Committer's log entry: Patch attributed to Patrick Moore <patrickm@rioport.com> on 03/09/2001.
Adds another constructor to pass in the error message.
- Committed by sboag@apache.org on 03/11/2001
Modified: java/src/org/apache/xalan/templates ElemAttribute.java
ElemElement.java Committer's log entry: 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.
- Committed by sboag@apache.org on 03/11/2001
Modified: java/src/org/apache/xml/utils SystemIDResolver.java Committer's log entry: 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.
- Committed by sboag@apache.org on 03/11/2001
Modified: java/src/org/apache/xalan/processor
TransformerFactoryImpl.java Committer's log entry: 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.
- Committed by sboag@apache.org on 03/11/2001
Modified: java/src/org/apache/xalan/transformer TransformerImpl.java Committer's log entry: 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.
- Committed by sboag@apache.org on 03/11/2001
Modified: java/src/org/apache/xalan/transformer QueuedEvents.java
QueuedStartElement.java ResultTreeHandler.java Committer's log entry: 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.
- Committed by sboag@apache.org on 03/11/2001
Modified: java/src/org/apache/xalan/serialize SerializerToHTML.java Committer's log entry: Applied patches from dmitri.ilyin@memiq.com (Dmitri Ilyin)
from http://nagoya.apache.org/bugzilla/show_bug.cgi?id=705.
- Committed by sboag@apache.org on 03/11/2001
Modified: java/src/org/apache/xpath XPathAPI.java Committer's log entry: Applied patch submitted by nboyd@atg.com (Norris Boyd)
at http://nagoya.apache.org/bugzilla/show_bug.cgi?id=702.
- Committed by sboag@apache.org on 03/11/2001
Modified: java/src/org/apache/xalan/serialize Encodings.java Committer's log entry: 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.
- Committed by sboag@apache.org on 03/11/2001
Modified: java/src/org/apache/xalan/templates ElemTemplateElement.java
StylesheetRoot.java Committer's log entry: Minor changes to better bottleneck throwing of Runtime exceptions
during processing.
- Committed by sboag@apache.org on 03/11/2001
Modified: java/src/org/apache/xalan/processor
TransformerFactoryImpl.java Committer's log entry: 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.
- Committed by sboag@apache.org on 03/11/2001
Modified: java/src/org/apache/xalan/lib/sql XConnection.java
XStatement.java Added: java/src/org/apache/xalan/lib/sql ConnectionPool.java
DefaultConnectionPool.java ExtensionError.java
PooledConnection.java QueryParameter.java
SQLExtensionError.java XConnectionPoolManager.java Committer's log entry: These are John Gentilin <johnglinux@eyecatching.com>
patches for connection pooling and parameterized
queries. These should be considered to be unstable
right now, as we are still working on some things.
- Committed by sboag@apache.org on 03/11/2001
Modified: 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 Committer's log entry: 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.
- Committed by sboag@apache.org on 03/12/2001
Modified: java/src/org/apache/xpath/patterns NodeTest.java Committer's log entry: 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:
>>1. Declare the Xerces-J support of schemas to have a bug and ask that
>>Xerces be corrected to always use a null namespace URI to indicate that
>>there is no default namespace. Even if the Xerces people change this
>>behavior, is this correct?
>
> Yes. If your description of the problem is accurate (you should probably
> submit a more detailed case so it can be reproduced in the lab), this is a
> parser/DOM-builder bug.
- Committed by costin@apache.org on 03/12/2001
Modified: java/src/org/apache/xalan/lib/sql ExtensionError.java Committer's log entry: 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.
- Committed by sboag@apache.org on 03/13/2001
Modified: java/src/org/apache/xml/utils TreeWalker.java Committer's log entry: Added back in the TreeWalker(ContentHandler contentHandler)
constructor, because I'm worried I'll break more dependent code.
- Committed by mmidy@apache.org on 03/13/2001
Modified: java/src/org/apache/xalan/res XSLTErrorResources.java
java/src/org/apache/xalan/xslt Process.java Committer's log entry: Implement new arguments for the command line interface: URIResolver,
EntityResolver and ContentHandler
- Committed by mmidy@apache.org on 03/13/2001
Modified: java/src/org/apache/xalan/templates FuncFormatNumb.java Committer's log entry: Fix error message to say that 2 or 3 arguments are required.
- Committed by mmidy@apache.org on 03/13/2001
Modified: java/src/org/apache/xalan/processor ProcessorLRE.java
java/src/org/apache/xalan/res XSLTErrorResources.java Committer's log entry: Better error message for missing or incorrect XSLT namespace declaration in a
stylesheet
- Committed by garyp@apache.org on 03/13/2001
Modified: java/src/org/apache/xalan/lib Redirect.java
java/src/org/apache/xalan/transformer TransformerImpl.java
java/src/org/apache/xalan/xslt Process.java Committer's log entry: 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.
- Committed by sboag@apache.org on 03/14/2001
Modified: java/src/org/apache/xpath VariableStack.java Committer's log entry: 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.
- Committed by curcuru@apache.org on 03/14/2001
Modified: java/src/org/apache/xalan/xslt Process.java Committer's log entry: Remove check for missing -IN arg; there are a number of use
cases for calling Process.main without an XML document
- Committed by costin@apache.org on 03/14/2001
Modified: java/src/org/apache/xalan/xslt Process.java Committer's log entry: 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.
- Committed by dleslie@apache.org on 03/14/2001
Modified: java/src/org/apache/xml/utils StringVector.java Committer's log entry: Added missing @serial Javadoc tags.
- Committed by sboag@apache.org on 03/15/2001
Modified: java/src/org/apache/xalan/lib/sql ConnectionPool.java
DefaultConnectionPool.java ExtensionError.java
SQLExtensionError.java XConnection.java
XConnectionPoolManager.java XStatement.java Committer's log entry: Update from John Gentilin <johnglinux@eyecatching.com> to
fix connection cleanup.
Compatibility source code updates: - Committed by mmidy@apache.org on 02/02/2001
Modified: java/compat_src/org/apache/xalan/xslt XSLTInputSource.java
XSLTResultTarget.java Committer's log entry: Implement some more methods for compatibility
- Committed by dleslie@apache.org on 02/02/2001
Modified: java/compat_src/org/apache/xalan/xslt XSLTInputSource.java Committer's log entry: Fixed javadoc for api that was just added back.
- Committed by dleslie@apache.org on 02/02/2001
Modified: java/compat_src/org/apache/xalan/xslt XSLTResultTarget.java Committer's log entry: Fixed javadoc for api that was just added back.
- Committed by mmidy@apache.org on 02/02/2001
Modified: java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java Committer's log entry: Fix problem with calling the processor with a liaison
- Committed by mmidy@apache.org on 02/02/2001
Modified: java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java Committer's log entry: Fix problem where source file was being parsed more than once and if using an
input stream, we would get a read error
- Committed by mmidy@apache.org on 02/12/2001
Modified: java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java Committer's log entry: Set system id in stylesheet handler
- Committed by mmidy@apache.org on 02/14/2001
Modified: java/compat_src/org/apache/xalan/xslt XSLTInputSource.java Committer's log entry: Call local setSystemId.
- Committed by mmidy@apache.org on 02/15/2001
Modified: java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java Committer's log entry: 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
- Committed by mmidy@apache.org on 02/22/2001
Modified: java/compat_src/org/apache/xalan/xslt StylesheetRoot.java Committer's log entry: Add getOutputMethod API.
- Committed by dleslie@apache.org on 03/07/2001
Modified: java/compat_src/org/apache/xalan/xpath/xml
XMLParserLiaisonDefault.java Committer's log entry: Put in Apache copyright.
- Committed by sboag@apache.org on 03/13/2001
Modified: java/compat_src/org/apache/xalan/xpath/xml TreeWalker.java
java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java Committer's log entry: Made changes for change to API for XalanJ2 TreeWalker, which
now requires that the DOM helper be created by the caller.
|
| |
- 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 (© 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 ( ) 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
( ) 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 version 1.3.0 does not).
|
| |
All known Xalan-Java bugs are listed in Bugzilla (the Apache bug database). For a list of open bugs with links to each bug
report, see XalanJ2 open bugs. If you find a new bug, please enter a XalanJ2 bug report in this
database.
 | Before you can enter your first bug report, you must submit your email address to Bugzilla and receive a password. |
We strongly encourage you write patches for problems you find and submit them to
xalan-dev@xml.apache.org. We review the patches we receive to make sure they do not break something else, and (assuming they
do not) include them in our next release. In the interest of fixing bugs, adding enhancements, and addressing outstanding design
issues, we sincerely want (and need!) your active participation in the ongoing development of Xalan.
Xerces bug in Xerces-Java version 1.3.0:
- Xerces-Java 1.2.3 does not process namespaces in SAX events when parsing UTF-16 documents, which causes Xalan-Java to fail with UTF-16
documents. Xerces will post a fix shortly.
|
| |
The Xalan-Java version 2.0.1 has been tested with Xerces-Java version 1.3.0. The Xalan-Java version 2.0.1 download from xml.apache.org includes xerces.jar from Xerces-Java version 1.3.0. For information about including xerces.jar on the system class path, see Setting up the system class path.
Important You may experience unpredictable anomalies if your Xalan and Xerces builds are not in synch. If you download an update to Xalan, check the release notes to determine which version of Xerces you should use.
|
|
| |
| |
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 bin 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
- Set the JAVA_HOME environment variable to the JDK root directory.
If you are using JDK 1.1.8, you must also put classes.zip in the JDK bin directory on the classpath. You can use Ant
with JDK 1.1.8 to compile and jar the Xalan-Java source files, but you must have JDK 1.2.2 or higher to build the
documentation.
- 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 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
|
dist
| 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.
|
| |
The Xalan-Java build is in xalan.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, xerces.jar, bsf.jar, and bsfengines.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 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
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.
If you want to rebuild the documentation without using Ant, keep the following in mind:
- Unzip xml-site-style.tar.gz into the xdocs directory (the operation places files in a number of subdirectories).
- Be sure stylebook-1.0-b2.jar, xalanjdoc.jar, xalan.jar, bsf.jar, bsfengines.jar, and xerces.jar are on the class
path.
- To build doc in a build/docs subdirectory, run StyleBook from the xdocs directory as follows:
java org.apache.stylebook.StyleBook "targetDirectory=../build/docs/" sources/xalanLocal.xml style
- To build the HTML source files that javadoc needs for the TrAX top-level and package-level documentation, add
a build/docs/apdidocs/javax/xml/transform directory and run the Xalan command-line utility from the xdocs directory
as follows (all one line):
java org.apache.xalan.xslt.Process
-in sources/trax/trax.xml
-param package-root '../../../src/'
-xsl style/stylesheets/spec.xsl
-out build/docs/apidocs/javax/xml/transform/trax.html
- Before you run javadoc, make sure the following directory structure exists under the Xalan root
directory: build/docs/apidocs.
- To build the API documentation, run the JDK 1.2.2 javadoc tool from the xdocs directory (all one line):
javadoc -doclet xalanjdoc.Standard
-docletpath ../bin/xalanjdoc.jar
-private
-overview ../src/javadocOverview.html -sourcepath ../src
-group TrAX "javax.xml.transform*"
-group Xalan_Core "org.apache.xalan.processor:
org.apache.xalan.templates:
org.apache.xalan.transformer"
-group XPath "org.apache.xpath*"
-group Utilities "org.apache.xml.utils*"
-group Xalan_Other "org.apache.xalan.client:
org.apache.xalan.dtm:
org.apache.xalan.extensions:org.apache.xalan.res:
org.apache.xalan.stree:org.apache.xalan.trace:
org.apache.xalan.xslt"
-group Xalan_Extensions "org.apache.xalan.lib*"
-group Serializers "org.apache.xalan.serialize"
org.apache.xalan.client org.apache.xalan.dtm
org.apache.xalan.extensions org.apache.xalan.lib
org.apache.xalan.lib.sql org.apache.xalan.processor
org.apache.xalan.res org.apache.xalan.stree
org.apache.xalan.templates org.apache.xalan.trace
org.apache.xalan.transformer org.apache.xalan.xslt
org.apache.xpath org.apache.xpath.axes
org.apache.xpath.compiler org.apache.xpath.functions
org.apache.xpath.objects org.apache.xpath.operations
org.apache.xpath.patterns org.apache.xpath.res
org.apache.xalan.serialize javax.xml.transform
javax.xml.transform.dom javax.xml.transform.sax
javax.xml.transform.stream javax.xml.parsers
-d ../build/docs/apidocs -windowtitle "Xalan-Java 2"
-doctitle "Xalan-Java 2" -bottom "Copyright ©
2000 Apache XML Project. All Rights Reserved."
|
|
| |
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.
|
 |  |  |  | Cumulative history of software changes |  |  |  |  |
| |
The following sections list the changes in each release since Xalan-Java version 2.0.D01.
 |  |  |  | Changes for Xalan-Java version 2.0 |  |  |  |  |
| |
Release 2.0 includes several bug fixes to the Xalan-Java and TrAX core and to the Xalan-Java 1 compatibility API. We also updated bsf.jar to the Bean Scripting Framework (BSF) 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 Xalan-Java 2 ErrorHandler.
- Fixed evaluation of stylesheet string parameters to conform to Xalan-Java 1 behavior (expressions for Xalan-Java 1 vs. String objects
for Xalan-Java 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 Xalan-Java 2 To-Do list that have been completed, see Tasks completed.
|
 |  |  |  | Changes for Xalan-Java version 2.0.D05 |  |  |  |  |
| |
All of the bugs reported in Xalan-Java 2.0.D01 have been fixed. The remainder of this section discusses two changes that we believe are of particular importance:
TrAX
The Transformation API for XML (TrAX) that Xalan-Java 2 implements has undergone substantial revisions since the release of Xalan-Java 2.0.D01. TrAX has joined the Java API for XML Parsing (JAXP) as part of the Sun® Java Specification Request 63. 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 TRaX (Transformation API for XML), and review Usage Patterns.
Output properties
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 getSerializer("xml") , for example, with getSerializer(OutputProperties.getDefaultMethodProperties("xml")) .
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.
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
{http\u003a//xml.apache.org/xslt}use-url-escaping=no
and you can control indenting with
{http\u003a//xml.apache.org/xslt}indent-amount=n
 | The colon after the "http" protocol must be escaped. |
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:
 |  |  |  | <?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xslt" version="1.0">
<xsl:output xalan:entities="myentities.ent"/>
<xsl:template match="/">
<out>}</out>
</xsl:template>
</xsl:stylesheet> |  |  |  |  |
=== myentities.ent ===
 |  |  |  | quot 34
amp 38
lt 60
gt 62
lala 125 |  |  |  |  |
The output is:
 |  |  |  | <?xml version="1.0" encoding="UTF-8"?>
<out>&lala;</out> |  |  |  |  |
See also Setting output properties in your stylesheets.
|
|
|
|