⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 header.xsl~

📁 《jsp编程起步》里面的所有源代码
💻 XSL~
字号:
<!--   - Formats the top level of the template.  header.xsl assumes the XTP   - has been read in as HTML.  So it can assume the existence of the   - html and body tags.  --><xsl:stylesheet parsed-content=false><#@ page import='com.caucho.web.*' import='com.caucho.vfs.*' #><#@ cache #><#!  String top = "/";  String title = null;  Navigation nav = null;  String topnav(Object a, Object b, Object c) { return ""; }  void initNavigation(XslWriter out)    throws IOException  {    PageContext page = out.getPage();    ServletContext app = page.getServletContext();    HttpServletRequest req = (HttpServletRequest) page.getRequest();    String realPath = req.getRealPath("toc.xml");    Path path = out.getPwd().lookupNative(realPath);    nav = new Navigation(path);    top = nav.getTop();    if (top == null || top == "")      top = "/";  }  void writeFamilyNavigation(XslWriter out)  {    PageContext page = out.getPage();    HttpServletRequest req = (HttpServletRequest) page.getRequest();    NavItem item = nav.findLink(req.getRequestURI());    if (item == null)      return;  }#>html<<  <#      initNavigation(out);     title = XPath.evalString("head/title", node);     if (title == null)       title = "";  #>  <html>  <head>  <title><#= title #></title>  <link rel="STYLESHEET" href="<#= top #>css/default.css" type="text/css">  </head>  <xsl:apply-templates select='body'/>  </html>>>html/body<<  <body bgcolor=white background="<#= top #>images/background.gif">  <table cellpadding="2" cellspacing="0" border="0" width="100%" summary="">  <tr valign="top"><td width="120">    <table cellspacing="0" cellpadding="0" border="0" width="100%">    <tr><td>      <img src="<#= top #>images/caucho.gif" width="120" height="40" alt="caucho"><br>      <!-- Left Navigation -->      <# writeFamilyNavigation(out); #>    </td></tr>    </table>  </td>  <td width="30">    <img src="<#= top #>images/pixel.gif" alt="" width="30" height="1">  </td>  <td width="*">    <xsl:comment> top navigation </xsl:comment>    <table width="100%" cellspacing="0" cellpadding="0" border="0" summary="">    <tr class="toptitle">      <td rowspan=2 width="90%" background="<#= top#>images/hbleed.gif">        <font class=toptitle size="+3">          &nbsp;<#= title #>        </font>        <xsl:for-each select='/html/head/title/@subtitle'>          <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<#= node1.getNodeValue() #>        </xsl:for-each>        <xsl:for-each select='/html/head/title/@author'>          <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>By <#= node1.getNodeValue() #></em>        </xsl:for-each>      </td>      <td align="left">&nbsp;<# topnav(out, "Home", "index.html"); #></td>      <td align="left">&nbsp;<# topnav(out, "Site&nbsp;Map", "sitemap.html"); #></td>    </tr>    <tr>      <td align="left">&nbsp;<# topnav(out, "Products", "products/index.html"); #></td>      <td align="left">&nbsp;<# topnav(out, "Download", "download/index.html"); #></td>    </tr>  </table>  <!-- vspace -->  <img src="<#= top #>pixel.gif" alt="" width="1" height="20"><br>  <!-- Actual Contents -->  <xsl:apply-templates/>  <!-- footer -->  <hr>  <!-- <# if (nav.isThreaded()) nav.writePrevNext(out, filename); #> -->  <center>    <a href="<#= top #>index.html">Home</a> |    <a href="<#= top #>products/index.html">Products</a> |     <a href="<#= top #>download/index.html">Download</a> |     <a href="<#= top #>about.html">About Caucho</a> |    <a href="<#= top #>support/index.html">Support</a> |    <a href="<#= top #>sitemap.html">Site Map</a>    <br>    <em>Copyright &copy; 1998-1999 Caucho Technology.  All rights reserved.</em>  </center>  <table border=0 cellspacing=0 width='100%'>  <tr><td>Write us at <a href='mailto:info@caucho.com'>info@caucho.com</a>    </td>    <td align=right><img src="<#= top #>images/logo.gif" width=96 height=32></td>  </tr>  </table>  </td>  <td width="20%"></td>  </tr>  </table>  </body>>></xsl:stylesheet>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -