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

📄 gbook.xsl

📁 网页留言簿源代码
💻 XSL
字号:
<?xml version="1.0"?>

<!--

GuestBook XSL File

Chris Eastwood, 2000

http://www.vbcodelibrary.com
//-->

<!-- Standard XSL stylesheet processing Instructions //-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<!-- Only interested in the root document object match //-->

<xsl:template match="/">

<HTML>

  <center>
    <h1>Welcome to the ASP/XML GuestBook</h1>
  </center>

  <table border = "1" width="100%">
    <tr>
      <td bgcolor="#FF0000"><font color="#FFFFFF">GuestBook Entries</font></td>
    </tr>
    <tr>
      <td>
         <table width="100%">
<!-- 
     Here's where we write out a row for each entry in the guestbook xml.
     - Note how I use the 'for-each' xsl statements to get the xml contents
       in descending date order
//-->
           <xsl:for-each select="guestbook/entry" order-by="-entry[@date]">
             <tr>
               <td width = "100%">
                 <b>Date: </b> <xsl:value-of select="@date"/><br/>
                 <b>Name:</b> <xsl:value-of select="name"/><br/>
                 <b>Email: </b> <xsl:value-of select="email"/><br/>
                 <b>HomePage : </b> <xsl:value-of select="homepage"/><br/>
                 <b>Country : </b> <xsl:value-of select="country"/><br/>
                 <b>Comment : </b> <pre><xsl:value-of select="comment"/></pre><br/>      
                 <hr/>
               </td>
             </tr>
        </xsl:for-each>
      </table>    
    </td>
  </tr>
</table>

</HTML>

</xsl:template>
</xsl:stylesheet>

⌨️ 快捷键说明

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