Expand | Collapse

▲ 13. Indexing of terms

13.1. Printing out an index

xsl:stylesheet id="stylesheet" exclude-result-prefixes="x2 lit hs" version="1.0" xml:lang="en"

    xsl:template match="hs:print-index"
      xsl:variable name="class" select="@class"

      <ul>
        xsl:for-each select="$site-map-doc"
          xsl:apply-templates select="//hs:ie[@class=$class]" mode="print-index"
            xsl:sort select="./hs:ip"
            xsl:sort select="./hs:is"
            xsl:sort select="./hs:it"
          
        
      </ul>
    

    xsl:template match="hs:ie" mode="print-index"
      <li>
        <a>
          xsl:attribute name="href"
            xsl:call-template name="map-uri"
          

          xsl:apply-templates select="hs:ip"
          xsl:if test="hs:is"
            xsl:text, 
            xsl:apply-templates select="hs:is"
          
          xsl:if test="hs:it"
            xsl:text, 
            xsl:apply-templates select="hs:it"
          
        </a>
      </li>
    


    xsl:template match="hs:ie"
    

  

Formatted using xhtml2to1 by Steve Cheng.