Subject: Applying templates
From: "Barry van Weldam" <barry@xxxxxxx>
Date: Mon, 24 Nov 2003 12:59:52 +0100
|
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 |
- Lookup efficiency in XALAN?
- JWolpert - Thu, 20 Nov 2003 16:46:07 -0500 (EST)
- <Possible follow-ups>
- JWolpert - Fri, 21 Nov 2003 14:57:27 -0500 (EST)
- Barry van Weldam - Mon, 24 Nov 2003 07:00:14 -0500 (EST) <=
- JWolpert - Fri, 21 Nov 2003 16:41:57 -0500 (EST)
|
|