Expand | Collapse

◀ 12. Cross references14. XHTML1 pass-through ▶

13. Indexing of terms

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

    xsl:template match="xsl:template[@name]" mode="index-term"
      xsl:param name="base-uri"

      xsl:element name="hs:ie"
        xsl:attribute name="class"
          xsl:value-of select="'xsl-named-template'"
        
        xsl:attribute name="href"
          xsl:call-template name="absolute-id"
            xsl:with-param name="base" select="$base-uri"
          
        
        <hs:ip>
          xsl:value-of select="@name"
        </hs:ip>
      

      xsl:apply-templates mode="index-term"
        xsl:with-param name="base-uri" select="$base-uri"
      
    

    xsl:template match="hs:ie" mode="index-term"
      xsl:param name="base-uri"

      xsl:element name="hs:ie"
        xsl:attribute name="class"
          xsl:value-of select="@class"
        
        xsl:attribute name="href"
          xsl:call-template name="absolute-id"
            xsl:with-param name="base" select="$base-uri"
            xsl:with-param name="target" select=".."
          
        

        xsl:if test="@ip"<hs:ip>xsl:value-of select="@ip"</hs:ip>
        xsl:if test="@is"<hs:is>xsl:value-of select="@is"</hs:is>
        xsl:if test="@it"<hs:it>xsl:value-of select="@it"</hs:it>

        xsl:copy-of select="*|text()"

      

      xsl:apply-templates mode="index-term"
        xsl:with-param name="base-uri" select="$base-uri"
      
    

    xsl:template match="text()" mode="index-term"
    

  

Formatted using xhtml2to1 by Steve Cheng.