The value for variable $tabNum is achievied by using xsl:number and count 
attribute to count the tables in the source xml, from whatever node you want to 
count from relative to the current table node.

 

From: gavin bowe [mailto:gavin.b...@oracle.com] 
Sent: Monday, July 02, 2012 1:10 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Table continuation headers

 

Aha, of course. Thank you. It would probably be better that I ask my other 
questions in a more appropriate forum. 

On 01/07/2012 15:50, Glenn Adams wrote: 

better to use text-align="start" instead of "left" for correct handling of both 
lr and rl writing modes

On Sun, Jul 1, 2012 at 8:36 AM, gavin bowe <gavin.b...@oracle.com> wrote:

Thanks Craig,

That's a handy workaround - although you can only use <fo:retrieve-marker> 
within static content as far as I understand such things. It would be good to 
know how to access the formal table number (shown as $tabNum in the extract 
below).

The XSL for the continuation text would also need to be internationalized and 
new localized entries created in the customization layer files for each 
supported language. I'm not quite sure how to implement the I18n bit - any 
"key" pointers would be welcome. I expect that the placement of the text might 
also need to be internationalized to support languages that don't read from top 
left to bottom right.

Gavin

On 26/06/2012 23:47, Craig Christophersen wrote:

There is a way to accomplish this currently using retrieve-markers.
In fo:page-sequence element
                <fo:static-content flow-name="xsl-region-before">
                                        <fo:table table-layout="fixed" 
width="100%" border-bottom-style="solid" height="18mm">
                                                <fo:table-column 
column-width="70mm"/>
                                                <fo:table-column 
column-width="118mm"/>
                                                <fo:table-body>
                                                        <fo:table-row 
height="6mm">
                                                                <fo:table-cell>
                                                                        
<fo:block font-size="11pt" text-align="left" font-weight="bold">
                                                                        
                                                                        
</fo:block>
                                                                </fo:table-cell>
                                                                <fo:table-cell>
                                                                        
                                                                </fo:table-cell>
                                                        </fo:table-row>
                                                        <fo:table-row 
height="6mm">
                                                                <fo:table-cell 
number-columns-spanned="2">
                                                                        
<fo:block font-size="11pt" text-align="left" font-weight="bold">
                                                                                
<xsl:value-of select="$pmc"/>
                                                                        
</fo:block>
                                                                </fo:table-cell>
                                                        </fo:table-row>
                                                
                                                </fo:table-body>
                                        </fo:table>
                                        
                                        <fo:block font-size="10pt" 
font-style="italic" padding-before="2mm"  padding-after="2mm" 
text-align="center">
                                                        <fo:retrieve-marker 
retrieve-class-name="tab_continued" 
retrieve-position="first-starting-within-page" retrieve-boundary="page"/>

                                                </fo:block>
                                        
        
                                </fo:static-content>

Then in fo:table-header element:
<xsl:for-each select="row">
<fo:table-row>
                                                                                
                <fo:table-cell>
                                                                                
                <fo:marker marker-class-name="tab_continued">
                                                                                
                        <fo:block font-size="10pt" text-indent="5mm" 
font-style="italic" text-align="center" keep-with-next="always" 
padding-before="1mm" padding-after="1mm">
                                                                                
                                
                                                                                
                                        <fo:inline border-bottom-style="solid"  
border-width=".5pt">
                                                                                
                Table<xsl:value-of select="$tabNum"/>&#xa0; (Continued)
                                                                                
                </fo:inline>
                                                                                
                                
                                                                                
                        </fo:block>
                                                                                
                        </fo:marker>
                                                                                
                </fo:table-cell>
                                                                                
        </fo:table-row>
<fo:table-row>   Then formatting for other rows.

Then in fo:table-body element:

<xsl:for-each select="row">
                                                                                
        
                                                                                
        <xsl:if test="not(parent::tbody/preceding-sibling::thead)">
                                                                                
                <fo:table-row padding-after="2mm">
                                                                                
                        <fo:table-cell padding-after="2mm">
                                                                                
                                <fo:marker marker-class-name="tab_continued">
                                                                                
                                        <fo:block font-size="10pt" 
text-indent="5mm" font-style="italic" text-align="center" 
keep-with-next="always" padding-before="1mm" padding-after="2mm">
                                                                                
                                                
                                                                                
                                                <fo:inline 
border-bottom-style="solid"  border-width=".5pt">
                                                                                
                                                        Table<xsl:value-of 
select="$tabNum"/>&#xa0; (Continued)
                                                                                
                                                </fo:inline>
                                                                                
                                                
                                                                                
                                        </fo:block>
                                                                                
                                </fo:marker>
                                                                                
                        </fo:table-cell>
                                                                                
                </fo:table-row>
                                                                                
        </xsl:if>
                                                                                
        <fo:table-row>  <!-- other row formatting -->

It takes a bit getting this to work, but it does work.  Here is a link that 
helps:
http://www.dpawson.co.uk/xsl/sect3/markers.html#d14055e100
Also there is more info out there if you search.  Might even be some on this in 
users forum.

Hope it helps, Craig


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

 

Reply via email to