This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: How to reuse header and footer templates while changing page template in the middle?


I finally figured out how to do it without using variables.

Much thanks to all who responded :)

Xiaocun Xu
mailto:xxu@commercialware.com

> -----Original Message-----
> From: Xu, Xiaocun 
> Sent: Wednesday, June 28, 2000 9:40 AM
> To: 'xsl-list@mulberrytech.com'
> Subject: How to reuse header and footer templates while changing page
> template in the middle?
> Importance: High
> 
> 
> Hi,
> 
> 	Thanks for everyone who helped :)
> 	Taking in all the suggestions, I decided to break the 
> XML into 3 parts: <header>, <footer> and <page> in the 
> following hierarchy:
> 		<header> Header </header>
> 		<footer> Footer </footer>
> 		<page> Page 1 </page>
> 		<page> Page 2 </page>
> 		etc......
> 	Hence my XSL will be devided into 3 templates: header, 
> footer and page.  Each <page> will be page breaked with:
> 		<div style="page-break-before: always" />
> The XSL I am building should have following structure:
> 		<xsl:apply-templates select="header"/> Header here
> 		<xsl:apply-templates select="page"/> Page 1 here
> 		<xsl:apply-templates select="footer"/> Footer here
> 		<xsl:apply-templates select="header"/> Header here
> 		<xsl:apply-templates select="page"/> Page 2 here
> 		<xsl:apply-templates select="footer"/> Footer here
> 		etc......
> then repeat the above structure for each <page> element I encounter.
> 	How can I reuse the header and footer templates while 
> changing the page template in the middle?  <xsl:for-each 
> select="page"> doesn't work in this case because <header> and 
> <footer> elements are outside of <page> element.  I think the 
> only way is to use global variable to contain the formatted 
> <header> and <footer>, how can I do that?
> 
> Much thanks,
> 
> Xiaocun Xu
> mailto:xxu@commercialware.com
> 


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.

WIN $1,000,000 !
WWW.COMMERCIALWARE.COM

**********************************************************************


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]