Hitachi

uCosminexus Application Server XML Processor User Guide


5.8 Sample Program that Uses the XSLTC Transformer

This section describes a program that uses the XSLTC transformer.

The section provides a method for using the XSLTC transformer function by changing the sample program described in 5.7 Sample Program that Uses the XSLT Transformer.

The following figure shows the changes to the program to enable use of the XSLTC transformer function. The changes shown in this figure make the XSLTC transformer function available. The method for executing the program and the execution result are identical to the sample program for using XSLT transformers. For details, see 5.7.6 Execution Result of the Sample Program (SampleXSLT.java).

Important note

Do not change the file name even if you change the program. Compilation fails if the file name is changed.

Figure 5‒7: Changes to the program to enable use of the XSLTC transformer function

[Figure]

The following describes the changes to the program. Each item number corresponds to the number in the comments in the program.

  1. Import the package to use the XSLTC transformer function.

  2. Apply the newInstance method to the TransformerFactoryXSLTC class and generate the TransformerFactory object.