You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "David S. Dixon" <dd...@leastsquares.com> on 2001/11/04 23:10:49 UTC
table bug
Greetings,
The code below causes fop 0.20.1 to crash. The cause is a missing
</fo:table-cell> following the "Moisture Rating" block.
-dd
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="traveler">
<fo:root font-family="Times Roman" font-size="10pt"
text-align="start" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="first-page"
page-height="11in"
page-width="8.5in"
margin-top="0.5in"
margin-bottom="0.5in"
margin-left="0.5in"
margin-right="0.5in">
<fo:region-body margin-top="1.0in"/>
<fo:region-before extent="1.0in"/>
<fo:region-after extent="0.8in"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="my-sequence">
<fo:single-page-master-reference master-name="first-page"/>
<fo:repeatable-page-master-reference
master-name="first-page"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-name="my-sequence">
<fo:static-content flow-name="xsl-region-before">
<fo:block font-size="12pt" text-align="start"
padding-top="5pt" padding-bottom="5pt">
Electronic Component Analysis
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block>
<!-- this says to apply the relevant templates -->
<xsl:apply-templates/>
</fo:block>
<fo:block>
More Stuff
</fo:block>
<!-- this is a placeholder so we can find out the total page
count -->
<fo:block id="last-page"></fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<!-- This part describes the header section -->
<xsl:template match="traveler/header">
<fo:block font-size="14pt" text-align="start" padding-top="5pt"
padding-bottom="5pt">
View/Print Traveler Header and Steps
</fo:block>
<fo:table>
<fo:table-column column-width="0.75in"/>
<fo:table-column column-width="1.0in"/>
<fo:table-column column-width="1.25in"/>
<fo:table-column column-width="1.0in"/>
<fo:table-column column-width="3.5in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block font-weight="bold">
Traveler Number
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<xsl:value-of select="/traveler/header/traveler-number"/>
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="3">
<fo:block>
<xsl:value-of
select="/traveler/header/contact/contact-name"/>
<xsl:value-of
select="/traveler/header/contact/contact-phone"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block font-weight="bold">
Part Type
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<xsl:value-of select="/traveler/header/part/part-type"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block font-weight="bold">
Moisture Rating
</fo:block>
<fo:table-cell>
<fo:block font-weight="bold">
Instructions
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<xsl:value-of
select="/traveler/header/part/instructions"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org