Next in thread → Next in month →

Re: [docbook-apps] Table 'thead' cell Color

From
Bob Stayton <>
Date
2004-03-24T09:43:02+00:00
ID
047901c41186$7f1021b0$6501a8c0@toshiro
Thread
Re: [docbook-apps] Table 'thead' cell Color
I assume you mean FO output, not HTML 
output.

 

For FO output, you can put the properties 
you want in the fo:table-header object by modifying the match="thead" 
template.  You can use xsl:attribute to add two properties:

 

<xsl:template 
match="thead">
  <xsl:variable name="tgroup" 
select="parent::*"/>

 

  <fo:table-header>

    <!-- ADD THESE TWO 
PROPERTIES -->
    <xsl:attribute 
name="background-color">#E0E0E0</xsl:attribute>
    
<xsl:attribute 
name="font-weight">bold</xsl:attribute>
    
<xsl:apply-templates select="row[1]">
      
<xsl:with-param 
name="spans">
        
<xsl:call-template 
name="blank.spans">
          
<xsl:with-param name="cols" select="../@cols"/>
        
</xsl:call-template>
      
</xsl:with-param>
    
</xsl:apply-templates>
  
</fo:table-header>
</xsl:template>

Those properties will be inherited by all 
the cells in the thead.

 

Bob Stayton
Sagehill Enterprises
DocBook Consulting


 

 

  
----- Original Message ----- 

  
From: 
  Russell Seymour 

  
To:  
  

  
Sent: Wednesday, March 24, 2004 12:11 
  AM

  
Subject: [docbook-apps] Table 'thead' 
  cell Color

  

  
Good morning All,

  
 

  
I have been using DocBook to create a report generation system and thanks 
  to all the help I have recieved on this site I have go there a lot quicker 
  than I would have done on my own.

  
 

  
I have one last thing (before the next phase anyway) that I would like 
  some help on.

  
 

  
I have created a customisation layer that outputs the reports in our 
  company standard format and I would like to be able to specify how the table 
  heading cells are formatted.  I do not want to have to hard code it into 
  the application as I believe this should be done in the stylesheet.

  
 

  
However although I can match the template for thead in the customistation 
  layer I cannot work out how to change the cell color and the font weight (and 
  color).

  
 

  
If anyone has any ideas that would be great.

  
 

  
Thanks lots,

  

Russell
Next in thread → Next in month →