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.
- In some cases, 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.
You can minimize this by breaking up large templates into smaller templates.
XSLTC has a new compile option to disable template inlining, compiling each
template in a separate method. From the command line, you would use
"-n"
to turn off inlining, or with TrAX set the "disable-inlining" attribute to the TransformationFactory.
For example,
 |  |  |  | TransformationFactory tfac = new TransformationFactory();
tfac.setAttribute("disable-inlining", new 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.SmartTransformerImpl .
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.
|
|