Hitachi

uCosminexus Application Server XML Processor User Guide


3.2.1 An Overview of XSLTC Transformer

The XSLTC transformer offers the same functionality as the XSLT transformer provided by Cosminexus XML Processor, with improved performance for XML document transformation.

The XSLTC transformer consists of the compiler that parses each XSLT stylesheet and the runtime processor that performs transformation. The compiler parses an XSLT stylesheet and generates the Java bytecode, called a translet, into memory for faster transformation. The runtime processor achieves high-speed transformation by executing the translet.

Note that the XSLTC transformer operates differently from the XSLT transformer in the following ways:

  1. For the XSLTC transformer, the error check function is more simplified than that of the XSLT transformer.

  2. Operations might differ between the XSLT transformer and the XSLTC transformer in the parts that are not defined in the XSLT1.0 specification.

You can expect higher transformation performance by using the XSLTC transformer instead of the XSLT transformer in the following cases:

Organization of this subsection

(1) Transforming multiple XML documents by using the same XSLT stylesheet

When you transform multiple XML documents by using the same XSLT stylesheet, you can expect higher transformation performance from approach 2 (below) than approach 1, both for the XSLT and XSLTC transformers:

  1. Generate the Templates and Transformer objects from the stylesheet every time and use the objects for each subsequent transformation.

  2. Generate the Templates and Transformer objects from the stylesheet once only and reuse the objects for each subsequent transformation.

When using approach 2 for the XSLTC transformer, the time-consuming translet creation is needed only once. The translet is then repeatedly used to execute subsequent transformations at a faster speed. For this reason, higher performance is expected when using approach 2 for the XSLT transformer.