[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Applying templates

Subject: Applying templates
From: "Barry van Weldam" <barry@xxxxxxx>
Date: Mon, 24 Nov 2003 12:59:52 +0100
fo table column column width
Hi,

I am trying to recreate my xsl file with the use of templates. 

Somehow i have get the Row part working but the Header part not.

Any suggestions?

This is a part of my .xsl file

 <fo:flow flow-name="xsl-region-body">
  <fo:table width="100%"  >
   <fo:table-column column-width="17mm"/>
            <fo:table-column column-width="23mm"/>
            <fo:table-column column-width="23mm"/>
            <fo:table-column column-width="23mm"/>
            <fo:table-column column-width="23mm"/>
            <fo:table-column column-width="16mm"/>
            <fo:table-column column-width="10mm"/>
            <fo:table-column column-width="23mm"/>
            <fo:table-column column-width="23mm"/>
            <fo:table-column column-width="23mm"/>
            <fo:table-column column-width="23mm"/>
            <fo:table-column column-width="23mm"/>
            <fo:table-column column-width="12mm"/>
   
      
    <fo:table-header  text-align="center" font-size="12px" font-weight="bold">
   <fo:table-row background-color="#DC9F34">
     <xsl:apply-templates select="Header"/>
   </fo:table-row>
  </fo:table-header>
  
   <fo:table-body> 
   <xsl:apply-templates />
   </fo:table-body>
  </fo:table> 

 </fo:flow>

.....
........
<!-- try template for the header values -->
 <xsl:template match="Header">
 <fo:table-cell border="solid black 1px">
     <fo:block><xsl:value-of select="node()"/></fo:block>
 </fo:table-cell>
 </xsl>

<!-- for each row i select a tmpl per celldo -->
  <xsl:template match="Row">
    <fo:table-row text-align="right" font-size="10px" >
    <xsl:apply-templates select="*" />
    </fo:table-row>
 </xsl:template>

 <!--Here i use a tmpl for each cell -->
 <xsl:template match="Row/*">
     <fo:table-cell border="solid black 1 px" border-collapse="collapse" padding-right="5px" padding-top="3px">
         <fo:block>
         <xsl:value-of select="node()[not(.='null')]"/>
         </fo:block> 
     </fo:table-cell>
 </xsl:template>






 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.