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

📄 day1_4.html

📁 本本人最近搜集的xml学习文档,都是易学经典的文档,希望对大家有用!
💻 HTML
📖 第 1 页 / 共 2 页
字号:
  <tr> 
    <td colspan="2">-<a href="../../1-director/index.html">Director</a> </td>
  </tr>
  <tr> 
    <td colspan="2" align="center" bgcolor="#666699"><a href="../../1-download/index.htm"><font color="#FFFFFF">网猴下载</font></a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-download/page1.htm">网页制作</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<font color="#000000"><a href="../../1-download/page2.htm">程序设计</a></font></td>
  </tr>
  <tr> 
    <td colspan="2">-<font color="#000000"><a href="../../1-download/page3.htm">网站设计</a></font></td>
  </tr>
  <tr> 
    <td colspan="2">-<font color="#000000"><a href="../../1-download/page4.htm">电子商务</a></font> 
    </td>
  </tr>
  <tr> 
    <td colspan="2" align="center" bgcolor="#666699"><a href="../../1-teach/index.htm"><font color="#FFFFFF">实用技巧</font></a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/internet/index.htm">Internet应用</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/photoshop/index.html">Photoshop</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/flash/page1.html">Flash</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/asp/index.html">ASP</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/php/index.html">PHP</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/java/index.htm">Java</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/vb/index.htm">VB</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/c/index.htm">C、C++</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-backend/database/php_mysql/index.html">PHP/MySQL</a></td>
  </tr>
  <tr> 
    <td colspan="2"><a href="../../1-backend/cgi_perl/perl_beginner/index.html">-Perl</a> 
    </td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/other/index.htm">其它</a> </td>
  </tr>
  <tr> 
    <td colspan="2" bgcolor="#666699"> 
      <div align="center"><font color="#FFFFFF">更多教程</font></div>
    </td>
  </tr>
  <tr> 
    <td colspan="2" height="17"><a href="../../1hdml/index.html">-HDML</a></td>
  </tr>
  <tr> 
    <td colspan="2" height="23"><font face="宋体"><a href="../../1-backend/database/course/day1_1.html">-网络数据库</a></font></td>
  </tr>
  <tr> 
    <td colspan="2" height="14"><a href="../../1-backend/protocols/ping/index.html"><font face="arial, helvetica, sans-serif">Ping</font></a></td>
  </tr>
  <tr> 
    <td colspan="2" height="20"><a href="../../1-backend/cgi_perl/search_engine/index.html">-创建搜索引擎</a></td>
  </tr>
  <tr> 
    <td colspan="2" height="16">-<a href="../../1adobe/GoLive/index.html">Adobe GoLive</a></td>
  </tr>
  <tr> 
    <td colspan="2"><a href="../../1-backend/cgi_perl/templates/index.html">模板</a></td>
  </tr>
  <tr> 
    <td colspan="2" align="center" bgcolor="#666699"><font color="#FFFFFF">合作伙伴</font></td>
  </tr>
  <tr> 
    <td colspan="2" align="left">-<a href="http://www.5dmedia.com/" target="_blank">5D精英网</a></td>
  </tr>
  <tr align="center"> 
    <td colspan="2"> <img src="../../Library/front_monkey.gif" width="59" height="68"></td>
  </tr>
  </tbody> 
</table>
<br><!-- #EndLibraryItem --></td>
      <!-- End of headlines (column 1: left column) --> <!-- Gutter between columns 1 and 2 --> 
      <td width="10" height="794"><img src="http://www.sohu.com/images/pixel.gif" width=10></td>
      <!-- Search box and directories (columns 2 and 3: middle columns, combined into one) --> 
      <td align=center valign=top width="558"> 
        <div align="left"><!-- #BeginEditable "1" --> 
<title>理解XSL</title>
理解XSL<a href="mailto:jay@wired.com"> 
        Jay Greenspan</a> 
        <p><br>
          <b>第四页:选择XSL</b></p>
        <p>简单的&lt;xsl:template match&gt;还不能完全满足我们的要求。比如,我希望当&lt;course&gt;标记符出现时取消&lt;meal&gt;标记符的内容。这样的话我就不用担心页面上同时显示&quot;dinner&quot;和&quot;appetizer&quot;。我可能还希望通过在最后的ingredient后面插入大量的空白来调整版面。</p>
        <p>如同某个广告部的人说的:所有这些都是可能的 - 还要更多。SL有一套用来把元素与其父成员或子成员匹配的工具。它也允许位置上的匹配。例如,可以在第一个和最后一个某个特定元素上应用特定的格式,等等。</p>
        <p>现在让我们考虑一些更复杂的事,比如令我在梦中出汗的任务。我需要菜谱名和它们的成分的清单。现在,如果我的网页与数据库没有联系,我就不得不写一个查询语句。因为我对SQL不太熟,所以需要得到的DBA帮助。但是如果知道XSL,我就会摆脱这些麻烦。</p>
        <p>&nbsp;</p>
        <PRE>

&lt;xsl:style sheet&gt;

   &lt;xsl:template match = "/"&gt;

      &lt;xsl:for-each select ="list/recipe"&gt;

         &lt;TABLE&gt;

         &lt;TR&gt;&lt;TD&gt;

         &lt;xsl:process select = "recipe_name"/&gt;&lt;/TD&gt;

         &lt;TD&gt;

            &lt;xsl:for-each select = "ingredients/item"&gt;

               &lt;BR&gt;&lt;xsl:process-children/&gt;&lt;/BR&gt;

            &lt;/xsl:for-each&gt;

         &lt;/TD&gt;&lt;/TR&gt;

         &lt;/TABLE&gt;

      &lt;/xsl:for-each&gt;

   &lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;

</PRE>
        <p><a href="sample2.html">结果</a>并不神奇。但是在table标记符中加些花样将没问题。</p>
        <p>显然,我在XML中存储了信息,但是我认为最好还是仔细看看。</p>
        <p>&nbsp;</p>
        <PRE>

   &lt;xsl:template match = "/"&gt;

      &lt;xsl:for-each select ="list/recipe"&gt;

</PRE>
        <p>第一行很熟悉,只是简单地与模板相匹配。但是第二行却有些不同 - 在元素清单中出现的每个菜谱元素做每件事,直到&lt;/xsl:for-each&gt;标记符。</p>
        <p>然后我开始HTML表格,用&lt;xsl:process select=&quot;recipe_name&quot;/&gt;标记符把recipe_name元素中的内容输出到表格单元中。</p>
        <p>在关闭第一个表格单元后,事情开始变酷。下一行(&lt;xsl:for-each select=&quot;ingredient/item&quot;&gt;)开始一个附加的嵌套循环,允许我把全部ingredient输出到合适的显示信息中。</p>
        <p>样式表的其余部分应该很好理解。</p>
        <p>但是等等,我知道你在想:“他说过酷了吗?什么这么酷?”</p>
        <p>for-each函数是XSL的几个程序化的特征之一。还有if-then和选择函数。这些特征允许任何人都可以以任何能想到的方式(或至少是可行的方式)容易地操纵XML内容。</p>
        <p>如果你能实现这些特征,就很酷。<a href="day1_5.html">&gt;&gt;</a></p>
        <p><b>理解XSL</b><br>
          <font color="#FF0000">第一页</font> <a href="day1_1.html">理解XSL</a><br>
          <font color="#FF0000">第二页</font> <a href="day1_2.html">攀登结果树</a><br>
          <font color="#FF0000">第三页</font> <a href="day1_3.html">一个XSL样式表</a><br>
          <font color="#FF0000">第四页</font> 选择XSL<br>
          <font color="#FF0000">第五页</font> <a href="day1_5.html">从规范到实现</a></p>
        <!-- #EndEditable --></div>
      </td>
      <!-- End of search box and directories (columns 2 and 3: middle columns, combined into one) --> 
      <!-- Gutter between columns 3 and 4 --> <!-- Other stuff (column 4: right column) --> 
      <!-- End of other stuff (column 4: right column) --> </tr>
  </table>
<!-- End of table surrounding page contents -->

  <hr noshade size=1 width=700>
 <span class=eng><br>
  Copyright (C) 1998-2000 Internet Technologies China.&nbsp; All rights reserved. 
  </span> 
</center>
</body>
<!-- #EndTemplate --></html>

⌨️ 快捷键说明

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