xml - How to Fix the table footer at bottom of the Page in XSL FO? -


i'm working xsl-fo (processed using apache fop).

my xsl code tables looks this:

<!-- ... xsl fo code data occupying 1/2 page ... --> <fo:table>    <fo:table-header>       item name     </fo:table-header>    <fo:table-footer>       total:           <xsl:value-of select="total" />    </fo:table-footer>    <fo:table-body>       <fo:table-row>          <xsl:value-of select="itemname" />       </fo:table-row>     </fo:table-body> </fo:table> 

i want have table footer @ bottom of every page (i tried using fo:table-footer).

i want footnote on pages following first one: if content requires more single page need footnote "continuation of previous page" after table footer.

the table footer must show total value on last page (i mean if i've 6 pages of table content every page except last must have footer total value blank , last page footer value).

xml source:

<itemdetail>    <itemname>car1</itemname>    <itemname>car2</itemname>    <itemname>car3</itemname>    <itemname>car4</itemname>    <itemname>car5</itemname>    <itemname>car6</itemname>    <itemname>car7</itemname>    <itemname>car8</itemname>    <itemname>car9</itemname>    <itemname>car10</itemname>    <itemname>car11</itemname>    <itemname>car12</itemname>    <itemname>car13</itemname>    <itemname>car14</itemname>    <itemname>car15</itemname>    <itemname>car16</itemname>    <itemname>car17</itemname>    <itemname>car18</itemname>    <itemname>car19</itemname>    <itemname>car20</itemname>  </itemdetail> <total>20</total> 

required sample output of page 1: required sample output of page 1

required sample output of page 2: required sample output of page 2

after re-reading question, this. should have page templates first, rest , last.

this 2 reasons --- (1) want table footers @ bottom , (2) many products (fop included) not support retrieve-table-marker. retrieving markers table-rows problematic formatters, content retrieved of such size causes table reformat (like row not fit anymore).

the first page template region-after have single table-row "total:" in blank.

the rest page template region-after have single table-row "total:" blank, followed "* continuation of previous page".

the last page template have nothing in region-after total:, "* continuation of previous page".

when creating table, add "total:" row in table after adding other rows appropriate total in it. either add @ end (without blank rows) or if putting in blank rows, make region-after 1 row smaller accommodate row. not recommend this though, unless must have blank rows , tables must same height. leave in footer , pull marker footer without retrieve-table-marker.

the caveat whether row size , page dimensions chosen "total:" row placed in region-after area matches rest of table.

see how position block @ bottom in region-body page template setup , order. use page template in case put nothing in region-after not want "*continuation" line in case.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -