A simple example of a table with some keeps (overused a bit, but this is an
older XSL and they were put in for workarounds to some bugs):

<fo:table table-layout="fixed" width="100%" height="100mm">
      <xsl:for-each select="columns/column">
            <fo:table-column column-width="proportional-column-width(1)"/>
      </xsl:for-each>
      <fo:table-header>
            <xsl:for-each select="reportrowheader">
                  <fo:table-row space-before.optimum="1pt"
space-after.maximum="1pt">
                            <xsl:for-each select="cell">
                              <fo:table-cell padding-right="2pt">
                                    <fo:block font-size="8pt">
                                          <xsl:apply-templates select="."/>
                                    </fo:block>
                              </fo:table-cell>
                            </xsl:for-each>
                  </fo:table-row>
            </xsl:for-each>
      </fo:table-header>
      <fo:table-body>
            <xsl:for-each select="reportrow">
                  <fo:table-row space-before.optimum="1pt"
keep-together.within-page="always" keep-with-previous.within-page="always">
                        <xsl:for-each select="cell[not(@display)]">
                              <fo:table-cell padding-right="4pt"
keep-together.within-page="always">
                                    <fo:block white-space-collapse="false"
space-before.optimum="1mm">
                                          <xsl:apply-templates select="."/>
                                    </fo:block>
                              </fo:table-cell>
                        </xsl:for-each>
                  </fo:table-row>
            </xsl:for-each>
      </fo:table-body>
</fo:table>

HTH.
-Lou




|---------+------------------------------------->
|         |           "Talken, Patrick (AGRE)"  |
|         |           <[EMAIL PROTECTED]|
|         |           ospace.com>               |
|         |                                     |
|         |           04/05/2005 10:36          |
|         |           Please respond to         |
|         |           fop-users                 |
|         |                                     |
|---------+------------------------------------->
  
>-----------------------------------------------------------------------------------------------------------|
  |                                                                             
                              |
  |        To:      <[email protected]>                          
                              |
  |        cc:                                                                  
                              |
  |        Subject: RE: table-header question                                   
                              |
  
>-----------------------------------------------------------------------------------------------------------|




Hi,

I got the table-headers to work (print on each page the table is split
on, at top of the table) in something similar to the example below:

<fo:table table-layout="fixed">

   <fo:table-column \>
   <fo:table-column \>
   <fo:table-column \>

   <fo:table-header>
       <fo:table-row>
            <fo:table-cell>            </fo:table-cell>
            <fo:table-cell>            </fo:table-cell>
            <fo:table-cell>            </fo:table-cell>
       </fo:table-row>
   </fo:table-header>


   <fo:table-body>
     ....
     ....
   </table-body>
</fo:table-body>

I think you are missing the table-row and table-cell tags, and I think
you need them inorder for the table-header to work properly.


Good Luck
Patrick

-----Original Message-----
From: Julia Reynolds [mailto:[EMAIL PROTECTED]

Sent: Tuesday, April 05, 2005 9:29 AM
To: [email protected]
Subject: RE: table-header question

I upgraded my fop version to 0.20.5, still no love from the fo:table.
Is the code below correct?
Should I be seeing headers on every page?
<fo:table table-layout="fixed" table-omit-header-at-break="false">
             <xsl:for-each select="th[position () =1]/cell">
                         <fo:table-column
column-width="proportional-column-width(1)"/>
             </xsl:for-each>
             <fo:table-header>
                         <xsl:apply-templates select="reporttable/th"/>
                         <xsl:apply-templates
select="reporttable/th/cell"/>
             </fo:table-header>
             <fo:table-body>
                         <xsl:apply-templates/>
             </fo:table-body>
</fo:table>

Thank you,
Julia
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 05, 2005 7:39 AM
To: [email protected]
Subject: Re: table-header question


Julia:
It looks like you need the FOP version you are running.  Run the Fop
command
line with the -d option:

java org.apache.fop.apps.Fop -d -xml yourxmlfile.xml -xsl
yourxslfile.xsl
-pdf debug.pdf

This will dump debugging info with one of the lines being something
like:
[INFO]: FOP 0.20.3

-Lou





                      Julia Reynolds

                      <[EMAIL PROTECTED]         To:
[email protected]

                      track.com>               cc:

                                               Subject: table-header
question

                      04/04/2005 16:47

                      Please respond

                      to fop-users










Hi, I just inherited an fo report recently that converts xml to a pdf.

I'm trying to get the header of my table to display on each page.

I've got this in my xsl:

<fo:table table-layout="fixed" table-omit-header-at-break="false">
             <xsl:for-each select="th[position () =1]/cell">
                         <fo:table-column
column-width="proportional-column-width(1)"/>
             </xsl:for-each>
             <fo:table-header>
                         <xsl:apply-templates select="reporttable/th"/>
                         <xsl:apply-templates
select="reporttable/th/cell"/>
             </fo:table-header>
             <fo:table-body>
                         <xsl:apply-templates/>
             </fo:table-body>
</fo:table>

I wonder if I might have a version problem.  I know that FO didn't fully
support this "table-omit-header-at-break"
attribute until a later version.  The jars in my installation have been
renamed without release notes.  They appear to be dated 3/3/2002.  Any
way
to get FO to tell me the version from the command line?

Thanks for your time!

Julia


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







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

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


******************************************
The information contained in, or attached to, this e-mail, may contain
confidential information and is intended solely for the use of the
individual or entity to whom they are addressed and may be subject to legal
privilege.  If you have received this e-mail in error you should notify the
sender immediately by reply e-mail, delete the message from your system and
notify your system manager.  Please do not copy it for any purpose, or
disclose its contents to any other person.  The views or opinions presented
in this e-mail are solely those of the author and do not necessarily
represent those of the company.  The recipient should check this e-mail and
any attachments for the presence of viruses.  The company accepts no
liability for any damage caused, directly or indirectly, by any virus
transmitted in this email.
******************************************

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







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

Reply via email to