zoukankan      html  css  js  c++  java
  • Channel_Subscription.xslt 解析RSS频道的XML

    <?xml version="1.0" encoding="GB2312"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:template match="/">
      <HTML>
       <HEAD>
        <TITLE>栏目分类</TITLE>
        <style>
        
    #foldheader
    {
    cursor:hand;
    list-style-image:url(fold.gif)
    }
    #foldinglist
    {
    list-style-image:url(list.gif)
    }

        </style>
        <link href="index.css" rel="stylesheet" type="text/css"/>
        <SCRIPT src="js/a1.js"/>
       </HEAD>
       <BODY>
        <xsl:for-each select="opml/body/outline">
         <xsl:value-of select="@title"/>
         <ul>
          <xsl:call-template name="outline1"/>
         </ul>
        </xsl:for-each>
        <SCRIPT src="js/a2.js"/>
       </BODY>
      </HTML>
     </xsl:template>
     <xsl:template name="outline1">
      <xsl:for-each select="outline">
       <xsl:choose>
        <xsl:when test="@xmlUrl!=''">
         <li>
          <a target="mainFrame">
           <xsl:attribute name="href">Right.aspx?xml_source=<xsl:value-of select="@xmlUrl"/></xsl:attribute>
           <xsl:value-of select="@title"/>
          </a>
         </li>
        </xsl:when>
        <xsl:otherwise>
         <li id="foldheader">
          <xsl:value-of select="@title"/>
         </li>
        </xsl:otherwise>
       </xsl:choose>
       <ul id="foldinglist" style="display:none">
        <xsl:call-template name="outline2"/>
       </ul>
      </xsl:for-each>
     </xsl:template>
     <xsl:template name="outline2">
      <xsl:for-each select="outline">
       <xsl:choose>
        <xsl:when test="*[@xmlUrl='']">
         <li>
          <xsl:value-of select="@title"/>
         </li>
        </xsl:when>
        <xsl:otherwise>
         <li>
          <a target="mainFrame">
           <xsl:attribute name="href">Right.aspx?xml_source=<xsl:value-of select="@xmlUrl"/></xsl:attribute>
           <xsl:value-of select="@title"/>
          </a>
         </li>
        </xsl:otherwise>
       </xsl:choose>
      </xsl:for-each>
     </xsl:template>
    </xsl:stylesheet>

  • 相关阅读:
    paip.提升性能C#.NET程序内存占用过多以及OutOfMemory解决方法
    ATTILAX项目进展表VC425
    paip.VOB DVD视频的无损分割与截取
    paip.程序不报错自动退出的解决
    paip.TechExcel DevSuite IIS 应用配置
    paip.软件版本完善计划C426fromVC423
    paip.chrome使用ACTIVX 的总结
    PAIP批量改名JS实现
    Source Navigato rNG4.4在ubuntu的简单的安装
    QuartusII编译出错小小总结
  • 原文地址:https://www.cnblogs.com/chinatefl/p/132916.html
Copyright © 2011-2022 走看看