[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Applying templates
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|