You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by shrutin <sh...@mastek.com> on 2009/10/21 12:02:35 UTC
Adding row based on a condition
Hello All,
I need to know whether the following can be achieved.
I have a table with dynamic number of rows. Between each rows i need some
space but this space should not be added if the row is the last row in the
page. How can this be done/
The following is the snippet of my XSL file
<xsl:for-each select="Record" >
<fo:table width="100%" font-size="10pt">
<fo:table-column column-width="3cm" />
<fo:table-column column-width="3cm" />
<fo:table-column column-width="8cm" />
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="left">
<fo:block left="0cm" >
<xsl:value-of select="Data1"/>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="left">
<fo:block left="0cm">
<xsl:value-of select="Data2"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell number-columns-spanned="3" text-align="left"
width="100%">>
<fo:block left="0cm">
<xsl:value-of select="Data3"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<!-- The below ros is just added to add space after every record -->
<fo:table-row height="1.5cm">
<fo:table-cell number-columns-spanned="3" text-align="left"
width="100%">>
<fo:block left="0cm"/>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:for-each>
--
View this message in context: http://www.nabble.com/Adding-row-based-on-a-condition-tp25989667p25989667.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
AW: Adding row based on a condition
Posted by Georg Datterl <ge...@geneon.de>.
Hi shrutin,
Do you need an empty cell or just some space? In the later case, space-after="1.5cm" on each table row might already help.
Mit freundlichen Grüßen
Georg Datterl
------ Kontakt ------
Georg Datterl
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert
Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
www.geneon.de
Weitere Mitglieder der Willmy MediaGroup:
IRS Integrated Realization Services GmbH: www.irs-nbg.de
Willmy PrintMedia GmbH: www.willmy.de
Willmy Consult & Content GmbH: www.willmycc.de
-----Ursprüngliche Nachricht-----
Von: shrutin [mailto:shrutij@mastek.com]
Gesendet: Mittwoch, 21. Oktober 2009 12:03
An: fop-users@xmlgraphics.apache.org
Betreff: Adding row based on a condition
Hello All,
I need to know whether the following can be achieved.
I have a table with dynamic number of rows. Between each rows i need some space but this space should not be added if the row is the last row in the page. How can this be done/
The following is the snippet of my XSL file
<xsl:for-each select="Record" >
<fo:table width="100%" font-size="10pt">
<fo:table-column column-width="3cm" />
<fo:table-column column-width="3cm" />
<fo:table-column column-width="8cm" />
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="left">
<fo:block left="0cm" >
<xsl:value-of select="Data1"/>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="left">
<fo:block left="0cm">
<xsl:value-of select="Data2"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell number-columns-spanned="3" text-align="left"
width="100%">>
<fo:block left="0cm">
<xsl:value-of select="Data3"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<!-- The below ros is just added to add space after every record -->
<fo:table-row height="1.5cm">
<fo:table-cell number-columns-spanned="3" text-align="left"
width="100%">>
<fo:block left="0cm"/>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:for-each>
--
View this message in context: http://www.nabble.com/Adding-row-based-on-a-condition-tp25989667p25989667.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org