Subject: Re: [xsl] XSL newbie question formatting From: "Tom Heiber-Cobb" <Tom.Heiber-Cobb@xxxxxxxxxxxx> Date: Thu, 31 Mar 2005 11:59:22 -0600 |
Change <xsl:apply-templates select="mailingAddr"/> to <xsl:call-template name="mailingAddr"/> >>> doopsterus@xxxxxxxxx 03-31-2005 11:44:23 AM >>> I have the following xsl code. This one works but the when I try to break it into a new template it does not work. Ideas? The broken code is at the bottom <xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="mailer" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm"> <fo:region-body margin-top="3cm"/> <fo:region-before extent="3cm"/> <fo:region-after extent="1.5cm"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="mailer"> <fo:flow flow-name="xsl-region-body"> <fo:block font-size="10pt" font-family="sans-serif" line-height="15pt" space-after.optimum="3pt" text-align="justify"> <fo:block> <xsl:value-of select="/header/contact"/> </fo:block> <fo:block> <xsl:value-of select="/header/addr1"/> </fo:block> <fo:block> <xsl:value-of select="/header/addr2"/> </fo:block> <fo:block> <xsl:value-of select="/header/addr3"/> </fo:block> <fo:block> <xsl:value-of select="/header/city"/> <xsl:value-of select="/header/state"/> <xsl:value-of select="/header/zip_code"/> </fo:block> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> THIS DOES NOT WORK WHY? All I did was make a template out of it. Or did I do more? <xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="mailer" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm"> <fo:region-body margin-top="3cm"/> <fo:region-before extent="3cm"/> <fo:region-after extent="1.5cm"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="mailer"> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:apply-templates select="mailingAddr"/> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <!-- DATA FIELD TEMPLATES --> <xsl:template name="mailingAddr"> <fo:block font-size="10pt" font-family="sans-serif" line-height="15pt" space-after.optimum="3pt" text-align="justify"> <fo:block> <xsl:value-of select="/header/contact"/> </fo:block> <fo:block> <xsl:value-of select="/header/addr1"/> </fo:block> <fo:block> <xsl:value-of select="/header/addr2"/> </fo:block> <fo:block> <xsl:value-of select="/header/addr3"/> </fo:block> <fo:block> <xsl:value-of select="/header/city"/> <xsl:value-of select="/header/state"/> <xsl:value-of select="/header/zip_code"/> </fo:block> </fo:block> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSL newbie question formattin, josh higgins | Thread | [xsl] Scope of xml source, includes, Karl Stubsjoen |
Re: [xsl] imperative/OO language wi, Brian Chrisman | Date | [xsl] Scope of xml source, includes, Karl Stubsjoen |
Month |