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

XSL newbie question formatting

Subject: XSL newbie question formatting
From: josh higgins <doopsterus@xxxxxxxxx>
Date: Thu, 31 Mar 2005 09:44:23 -0800 (PST)
header.addr3
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"/>&#160;<xsl:value-of
select="/header/state"/>&#160;<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"/>&#160;<xsl:value-of
select="/header/state"/>&#160;<xsl:value-of
select="/header/zip_code"/>
		</fo:block>
	</fo:block>
</xsl:template>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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.