speed issues with XSL:FO tables.

Hi,
     I am facing some speed issues while generating PDF tables using
FOP. I need to
be able to generate the entire PDF document within 6-7 seconds. However,
I found that a table with 500+ rows with about 6 or 7 columns takes the
entire PDF doc
about 20 seconds for generation. Is there some way to write the XSL:FO
so that
transformation occurs quickly. Here's the XSL I use to get the FO (this
takes
about a second to convert i.e XML to FO) :-

<xsl:for-each select="TABLE">
<fo:block border="thin solid navy" padding-before="18pt"
padding-bottom="18pt">
<fo:block text-align="start" font-family="Times Roman"
font-weight="bold"><xsl:value-of select="@name"/></fo:block>
<xsl:if test="MESSAGE">
<fo:block text-align="start" font-family="Times Roman"><xsl:value-of
select="dataexport_result/RESULT/MESSAGE"/></fo:block>
</xsl:if>
<fo:table border-collapse="separate">
<fo:table-column column-width="3cm"/>
<fo:table-column column-width="3cm"/>
<xsl:for-each select="SCHEMA/COLUMN">
<xsl:choose>
<xsl:when test="@type='varchar'">
<fo:table-column column-width="6cm"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="/ReportXMLFormat/@type='custom'">
<fo:table-column column-width="7cm"/>
</xsl:when>
<xsl:otherwise>
<fo:table-column column-width="3cm"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<fo:table-header>
<fo:table-row background-color="#9999cc">
<fo:table-cell border-color="#808080" border-width="0.5pt"
border-style="solid">
<fo:block text-align="start" font-family="Times Roman"><xsl:value-of
select="'Start Time'"/></fo:block>
</fo:table-cell>
<fo:table-cell border-color="#808080" border-width="0.5pt"
border-style="solid">
<fo:block text-align="start" font-family="Times Roman"><xsl:value-of
select="'End Time'"/></fo:block>
</fo:table-cell>
<xsl:for-each select="SCHEMA/COLUMN">
<fo:table-cell border-color="#808080" border-width="0.5pt"
border-style="solid">
<fo:block text-align="start" font-family="Times Roman"><xsl:value-of
select="@name"/></fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<xsl:for-each select="ROWS/ROW">
<fo:table-row>
<xsl:choose>
<xsl:when test="position() mod 2 = 1">
<xsl:attribute name="background-color">#ffffff</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="background-color">#c0c0c0</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<fo:table-cell border-color="#808080" border-width="0.5pt"
border-style="solid">
<fo:block text-align="start" font-family="Times Roman"><xsl:value-of
select="@starttime"/></fo:block>
</fo:table-cell>
<fo:table-cell border-color="#808080" border-width="0.5pt"
border-style="solid">
<fo:block text-align="start" font-family="Times Roman"><xsl:value-of
select="@endtime"/></fo:block>
</fo:table-cell>
<xsl:for-each select="VALUE">
<fo:table-cell border-color="#808080" border-width="0.5pt"
border-style="solid">
<fo:block text-align="start" font-family="Times Roman"><xsl:value-of
select="."/></fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:block>
</xsl:for-each>
</fo:block>
</xsl:for-each>

Any Help will be greatly appreciated.
Wishing you all a very happy and prosperous New Year.

Regards
Arvind.

Received on Wednesday, 2 January 2002 02:33:50 UTC