|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to reuse header and footer templates while changing page
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
|
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
|

Cart








