Jasmin,

Jasmin Mehta wrote:
I haven’t create any table yet in my xsl-fo. I don’t know how to do it? Can you pl help me with small example?

You mean something like this?:

;-P

<?xml version="1.0" encoding="UTF-8"?>
<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="/document">
<fo:root>
<!-- defines page layout -->
<fo:layout-master-set>
<fo:simple-page-master master-name="repeating" page-height="28cm" page-width="22cm" margin-top="1cm" margin-bottom="1.3cm" margin-left="1cm" margin-right="1cm">
<fo:region-body margin-bottom="6.5cm" margin-top="7.6cm"/>
<fo:region-before extent="7.6cm"/>
<fo:region-after extent="6.5cm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="repeating_pm">
<fo:repeatable-page-master-reference master-name="repeating"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<!-- DEFINE PAGE SEQUENCE - repeating -->
<fo:page-sequence master-reference="repeating">
<fo:static-content flow-name="xsl-region-before">
<fo:block padding="0pt" xsl:use-attribute-sets="attNormal">
<xsl:call-template name="tmpHeader"/>
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<fo:block xsl:use-attribute-sets="attNormal">
<xsl:call-template name="tmpFooter"/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block>
<xsl:call-template name="tmpBody"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<!-- REGION-BEFORE: tmpHeader TEMPLATE -->
<xsl:template name="tmpHeader">
<fo:block padding="0pt">
<!-- REGION-BEFORE (Header) CONTENT -->
</fo:block>
</xsl:template>
<!-- REGION-AFTER: tmpFooter TEMPLATE -->
<xsl:template name="tmpFooter">
<fo:block padding="0pt">
<!-- REGION-AFTER (Footer) CONTENT -->
</fo:block>
</xsl:template>
<!-- REGION-BODY: tmpBody TEMPLATE -->
<xsl:template name="tmpBody">
<fo:block padding="0pt">
<!-- REGION-BODY (Body) CONTENT -->
<xsl:call-template name="tmpBody"/>
</fo:block>
</xsl:template>
<xsl:template name="tmpHeader">
<fo:block padding="0pt">
<fo:table border="0pt" table-layout="fixed" margin-top="4pt">
<fo:table-column column-width="2cm"/>
<fo:table-column column-width="2cm"/>
<fo:table-column column-width="2cm"/>
<fo:table-column column-width="2cm"/>
<fo:table-column column-width="2cm"/>
<fo:table-column column-width="2cm"/>
<fo:table-column column-width="2cm"/>
<fo:table-column column-width="2cm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell padding="1pt">
<fo:block keep-with-next.within-page="always" font-weight="bold">
Patient
</fo:block>
</fo:table-cell>
<fo:table-cell padding="1pt">
<fo:block keep-with-next.within-page="always">
Gina Latta
</fo:block>
</fo:table-cell>
<fo:table-cell padding="1pt">
<fo:block keep-with-next.within-page="always" font-weight="bold">
Age
</fo:block>
</fo:table-cell>
<fo:table-cell padding="1pt">
<fo:block keep-with-next.within-page="always">
60
</fo:block>
</fo:table-cell>
<fo:table-cell padding="1pt">
<fo:block keep-with-next.within-page="always" font-weight="bold">
Sex
</fo:block>
</fo:table-cell>
<fo:table-cell padding="1pt">
<fo:block keep-with-next.within-page="always">
Yes
</fo:block>
</fo:table-cell>
<fo:table-cell padding="1pt">
<fo:block keep-with-next.within-page="always" font-weight="bold">
Patient ID#
</fo:block>
</fo:table-cell>
<fo:table-cell padding="1pt">
<fo:block keep-with-next.within-page="always">
222222222222
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</xsl:template>
<xsl:template name="tmpFooter">
<fo:block padding="0pt">
FOOTER_CONTENT_GOES_HERE
</fo:block>
</xsl:template>
<xsl:template name="tmpBody">
<fo:block padding="0pt">
BODY_CONTENT_GOES_HERE
</fo:block>
</xsl:template>
</xsl:stylesheet>



-- Clay Leeds - [EMAIL PROTECTED] Web Developer - Medata, Inc. - http://www.medata.com PGP Public Key: https://mail.medata.com/pgp/cleeds.asc


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to