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

Re: Applying templates

Subject: Re: Applying templates
From: "Barry van Weldam" <barry@xxxxxxx>
Date: Mon, 24 Nov 2003 14:10:26 +0100
table head template
I have tested some things and it seems that my use of

<xsl:apply-templates select="Header"/>

<xsl:apply-templates select="Row"/>

is not good. 

But when i look at http://www.w3schools.com/xsl/xsl_apply_templates.asp i can not see the difference.


 

----- Original Message ----- 
From: "Barry van Weldam" <barry@xxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, November 24, 2003 1:51 PM
Subject: Re:  Applying templates 


Hmm,

Recreated my xsl without typos etc.

Now i don't get a parse error, but my data isn't showing

 <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 select="Row" />
   </fo:table-body>
  </fo:table> 

 </fo:flow>

....
with these templates

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

<!-- 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.