For this release, please note the following changes, additions, omissions, problems, procedures for running demos,
and new support for the TrAX API.
For an introduction to XSLTC, see Using XSLTC.
| |
- The strip space element does not work with copy-of. For example, with
<xsl:strip-space
elements="*"/> , if you do an identity transform by matching on
the root node (/) and then do a copy-of select="." , the whitespace-only
nodes are not stripped out. xsl:strip-space works when you do not do a copy-of.
- The default for template inlining has been changed. Previously,
by default, inlining (putting all the templates into one big method) was on and
the
"-n" option to the compile command line disabled inlining.
With inlining on, XSLTC can generate methods that are too long (> 64K length)
to run, or contain jump offsets that are too large for the JVM to handle.
Now the default is not to inline templates. Instead, compilation creates separate
methods for each template. Inlining was thought to improve performance,
but with recent hotspot technology in the Java 1.4.x JVM, performance is better with
inlining off. From the command line, you would use "-n"
to turn on inlining, or with TrAX set the "enable-inlining" attribute to the TransformerFactory.
For example,
 |  |  |  | TransformerFactory tfac = new TransformerFactory();
tfac.setAttribute("enable-inlining", Boolean.TRUE) |  |  |  |  |
- XSLTC tries to determine the order in which global variables are initialized
by tracking the dependencies between them. In some cases, the value of a variable
may depend on a template, e.g., if
xsl:call-template is used to initialized
a variable whose type is RTF. If this happens, a NPE may be thrown at runtime
when the translet attempts to access a variable that has not been properly
initialized. In most cases, this problem can be avoided by reordering the
variable declarations.
To check on the open bugs in the current Apache xml-xalan/java repository,
follow the instructions below:
- Go to http://nagoya.apache.org/bugzilla.
- Select Query Existing Bug Reports.
- Choose:
Program: XalanJ2
Component: org.apache.xalan.xsltc (and) Xalan-Xsltc
- Submit the query.
|
| |
As part of the TrAX API, a "Smart Transformer Switch" enables automatic switching between Xalan and XSLTC
processors within your application. It uses Xalan to create your
Transformer objects, and uses XSLTC to create your Templates objects.
To use the switch, you set the TrAX system property,
javax.xml.transform.TransformerFactory , to org.apache.xalan.xsltc.trax.SmartTransformerFactoryImpl .
For one-time transformations or transformations that require extensions supported by Xalan, and not XSLTC,
you would use Transformer objects. For a repeated transformation where performance is critical, you would
use Templates objects.
|
|