Tables are similar to HTML so you just need to be careful.

<?xml version="1.0" encoding="UTF-8"?>
<banks>
        <bank id="1">
                <name>Bank Of America</name>
                <address>USA</address>
                <curr>US Dollars</curr>
        </bank>
        <bank id="4">
                <name>Singapre bank</name>
                <swiftid>444444</swiftid>
                <curr>Singapore Dollars</curr>
        </applicantbank>                        
</banks> 


Use a for each within your XSL FO file \
                        <xsl:for-each select="banks">
                            <fo:table width="100%"
space-before.optimum="1pt" space-after.optimum="2pt">
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-column />
                                <fo:table-header>
                                    <fo:table-row
background-color="#C0C0C0">
                                        <fo:table-cell>
                                            <fo:block>name</fo:block>
                                        </fo:table-cell>
                                                        <fo:table-cell>
                                            <fo:block>address</fo:block>
                                        </fo:table-cell>
                                                        <fo:table-cell>
                                            <fo:block>currency</fo:block>
                                        </fo:table-cell>
                                    </fo:table-row>
                                </fo:table-header>
                                <fo:table-body>
                                    <xsl:for-each select="bank">
                                        <fo:table-row>
                                                        <fo:table-cell>
                                                <fo:block>
                                                    <xsl:for-each
select="name">
                                                        <xsl:apply-templates
/>
                                                    </xsl:for-each>
                                                </fo:block>
                                            </fo:table-cell>
                                                        <fo:table-cell>
                                                <fo:block>
                                                    <xsl:for-each
select="address">
                                                        <xsl:apply-templates
/>
                                                    </xsl:for-each>
                                                </fo:block>
                                            </fo:table-cell>
                                                        <fo:table-cell>
                                                <fo:block>
                                                    <xsl:for-each
select="curr">
                                                        <xsl:apply-templates
/>
                                                    </xsl:for-each>
                                                </fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                    </xsl:for-each>
                                </fo:table-body>
                            </fo:table>
                        </xsl:for-each>



Also see this link has lots of examples
http://www.zvon.org/HowTo/Output/



Hope This helps
Cheers!

Subbiah


> -----Original Message-----
> From: appana valli [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, November 17, 2004 12:10 AM
> To: [EMAIL PROTECTED]
> Subject: regarding table within a table
> 
> hi all,
>  
> i am a beginner in using fop to convert xml to text or pdf.
> my xml file have table like structure.
> i want to convert to text file.
> but i am getting problems when i have a table within table cell.
> the inner table is getting displayed after the outer table.
> can u give any sample code that converts a table like 
> structure to pdf or xml.
> 
> Yahoo! India Matrimony 
> <http://in.rd.yahoo.com/specials/mailtg/*http://yahoo.shaadi.c
om/india-matrimony/> : Find your life partner online >
<http://in.rd.yahoo.com/specials/mailtg2/*http://yahoo.shaadi.
com/india-matrimony/> .
> 


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

Reply via email to