Am using fop 0.20.4 and am having trouble with the following xml. The table
is not being rendered at all. However if I remove the TABLE parent P it
renders fine. Is this a bug or am I missing something. I also tried putting
the template rules for P and TABLE as a for-each rule within the RECORDITEM
template with no success.
Here's the xml:
<RECORD fragment="longtermdebt" recid="3769" fragid="18" product="surveys"
group="surveys" status="1">
<ID idtype="fpid">3769</ID>
<RECORDSECTION docfragment="longtermdebt" sectionformat="PARA">
<RECORDITEM sqlsource="coverage" type="19">Outstanding at Dec. 31, 2001:<P>
<TABLE border="1" align="CENTER">
<TR>
<TD>Bell Canada[1]</TD>
<TD>$9,899,000,000</TD>
</TR>
<TR>
<TD>Other subsidiaries</TD>
<TD>6,638,000,000</TD>
</TR>
<TR class="DB-TOTAL" desc="total">
<TD> </TD>
<TD>16,537,000,000</TD>
</TR>
<TR>
<TD>Less: Current portion</TD>
<TD>1,676,000,000</TD>
</TR>
<TR class="DB-TOTAL" desc="total">
<TD> </TD>
<TD>14,861,000,000</TD>
</TR>
</TABLE>
</P>
<P> [1] Consists of debentures and notes totaling $9,057,000,000 at a
weighted average interest rate of 7.5% and due between 2002 and 2054;
subordinated debentures totaling $275,000,000 at a weighted average interest
rate of 8.2% and due between 2026 and 2031; and other debt totaling
$567,000,000.</P>
</RECORDITEM>
</RECORDSECTION>
</RECORD>
Here's the XSL
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match = "RECORD [(_at_)fragid = '18']">
<fo:block font-weight="bold">
<xsl:text>Long Term Debt:</xsl:text>
</fo:block>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="RECORDITEM">
<fo:block margin-left="8pt" text-indent="12pt">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="P">
<fo:block text-indent="12pt">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="TABLE">
<fo:table>
<fo:table-column column-width="4cm" text-align="left"/>
<fo:table-column column-width="4cm" text-align="right"/>
<fo:table-column column-width="4cm" text-align="right"/>
<fo:table-column column-width="4cm" text-align="right"/>
<fo:table-body>
<xsl:for-each select="TR">
<fo:table-row>
<xsl:for-each select="TD">
<fo:table-cell>
<fo:block>
<xsl:value-of select="."/>
</fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template match="B">
<fo:inline font-weight="bold"><xsl:value-of select="."/></fo:inline>
</xsl:template>
</xsl:stylesheet>
Thanks in advance for any suggestions
Dan
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list