IBM®
跳转到主要内容
    中国 [选择]    使用条款
 
 
Select a scope: Search for:    
    首页    产品    服务与解决方案     支持与下载    个性化服务    
跳转到主要内容

developerWorks 中国  >  XML  >

Working XML: Wrapping up XM version 1

Managing a list of links and the table of contents

developerWorks

Return to article.


Listing 7. The style sheet builds a list of project descriptions
        
<xsl:template match="xm:File[@isDirectory='true']">
   <xsl:variable name="index-name" select="concat(text(),'/index.xml')"/>
   <xsl:variable name="index-doc" select="document(concat('x-source:',$index-name))"/>
   <xsl:if test="not($index-doc/xm:NotAvailable)">
      <xsl:variable name="index-info" select="$index-doc/db:article/db:articleinfo"/>
      <li>
         <a href="{$index-name}">
            <xsl:value-of select="$index-info/db:title"/>
            <xsl:if test="$index-info/db:subtitle">
               <xsl:text>: </xsl:text>
               <xsl:value-of select="$index-info/db:subtitle"/>
            </xsl:if>
         </a>
      </li>
   </xsl:if>
</xsl:template>
      

Return to article.

    关于 IBM 隐私条约 联系 IBM 使用条款