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

RE: How to reuse header and footer templates while changing

Subject: RE: How to reuse header and footer templates while changing page template in the middle?
From: "Xu, Xiaocun" <XXu@xxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Jun 2000 15:00:36 -0400
header and footer templates
I finally figured out how to do it without using variables.

Much thanks to all who responded :)

Xiaocun Xu
mailto:xxu@xxxxxxxxxxxxxxxxxx

> -----Original Message-----
> From: Xu, Xiaocun 
> Sent: Wednesday, June 28, 2000 9:40 AM
> To: 'xsl-list@xxxxxxxxxxxxxxxx'
> 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@xxxxxxxxxxxxxxxxxx
> 


**********************************************************************
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


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.