Adding header and fotter in an XSLT file

libelis

New Member
I have an XSLT file which transfroms an XML into a word document. My problem is I want to add headers and footer in the document. How do I do it?My question is basically similar to this Header and footer and page numbers using xslt.More help about headers and footers can be found here. Basically I need to use these tags but how do I use it in my template? Do I put it in the end or somewhere in the middle? I would also like to change the word page layout to landscape which is portrait be default.\[code\]<fo:region-before> defines the top region (header)<fo:region-after> defines the bottom region (footer)\[/code\]Assume this is my XSLT\[code\]<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"> <html> <body> <h2>My CD Collection</h2> <table border="1"> <tr bgcolor="#9acd32"> <th>Title</th> <th>Artist</th> </tr> <xsl:for-each select="catalog/cd"> <tr> <td><xsl:value-of select="title"/></td> <td><xsl:value-of select="artist"/></td> </tr> </xsl:for-each> </table> </body> </html></xsl:template></xsl:stylesheet>\[/code\]The above example has been copied from w3school
 
Back
Top