Download Java And XSLT
Transcript
<xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- copy the <head> from the source document --> <xsl:copy-of select="html/head"/> <body> <!-- this table defines the overall layout of the page --> <table width="100%" cellpadding="4" cellspacing="0" border="0"> <tr bgcolor="#f0f0f0"> <td colspan="2"> <xsl:call-template name="createTopNavbar"/> </td> </tr> <tr valign="top"> <td bgcolor="#cccccc" width="150px"> <xsl:call-template name="createLeftNavbar"/> </td> <td bgcolor="white"> <!-******************************************************* ** Copy all contents of the <body> from the source ** XHTML document to the result tree XHTML document. **************************************************** --> <xsl:copy-of select="html/body/* | html/body/text( )"/> </td> </tr> </table> </body> </html> </xsl:template> <!-******************************************************************* ** This template produces the top navigation bar. **************************************** ************************--> <xsl:template name="createTopNavbar"> <xsl:call-template name="navButton"> <xsl:with-param name="category" select="'home'"/> <xsl:with-param name="displayName" select="'Home'"/> <xsl:with-param name="url" select="'home.xml'"/> </xsl:call-template> | <xsl:call-template name="navButton"> <xsl:with-param name="category" select="'company'"/> <xsl:with-param name="displayName" select="'Company'"/> <xsl:with-param name="url" select="'company.xml'"/> </xsl:call-template> | <xsl:call-template name="navButton"> <xsl:with-param name="category" select="'products'"/> <xsl:with-param name="displayName" select="'Products'"/> <xsl:with-param name="url" select="'products.xml'"/> </xsl:call-template> | <xsl:call-template name="navButton"> <xsl:with-param name="category" select="'jobs'"/>