Hitachi

uCosminexus Application Server XML Processor User Guide


6.8.2 Notes on Transformation Performance

Table 6‒14: Notes on XSLTC (transformation performance)

No.

Notes

1

In all cases described in 3.2.1 (1) Transforming multiple XML documents by using the same XSLT stylesheet, it is not guaranteed that the transformation performance of the XSLTC transformer may be higher than that of the XSLT transformer. When using the XSLTC transformer, Hitachi recommends that you evaluate the performance with the XSLT stylesheet that is actually used and target XML document for the transformation.

2

If XSLTC is used for transformation of an XML document that uses a stylesheet that meets all of the following conditions, the memory usage increases in proportion to the number of repetitions of processing. Estimate the memory requirements under the assumption that processing is repeated the maximum possible number of times.

  1. Either of the following items is set as a variable or parameter in the <xsl:variable> or <xsl:param> element:

    - Result tree fragment (value defined by using a template specified as element content rather than the select attribute)

    - Node set

  2. The item in condition 1 is processed repeatedly.

Example 1: In this example, a result tree fragment is set as a variable:

<xsl:for-each select="/ns1:root/ns1:Data">

<xsl:variable name="V1">

<xsl:element name="RTF_ROOT" namespace="">

<xsl:copy-of select="." />

</xsl:element>

</xsl:variable>

<xsl:element name="ELE1" namespace="">

<xsl:copy-of select="$V1" />

</xsl:element>

</xsl:for-each>

Example 2: In this example, a result tree fragment is set as a parameter:

<xsl:template match="/">

<xsl:for-each select="/ns1:root/ns1:Data">

<xsl:call-template name="t2">

<xsl: with-param name="P1">

<xsl:element name="RTF1" namespace="">

<xsl:copy-of select="." />

</xsl:element>

</xsl: with-param>

</xsl:call-template>

</xsl:for-each>

</xsl:template>

<xsl:template name="t2">

<xsl:param name="P1"/>

<xsl:element name="ELE1" namespace="">

<xsl:copy-of select="$V1" />

</xsl:element>

</xsl:template>

Example 3: In this example, a node set is set as a variable (the document() function is used to load different XML documents):

<xsl:for-each select="/ns1:root/ns1:Data">

<xsl:variable name="V1" select="document(@refdoc)"/>

<xsl:element name="ELE1" namespace="">

<xsl:copy-of select="$V1/*" />

</xsl:element>

</xsl:for-each>