cvs commit: BLFS/BOOK/stylesheets/xhtml lfs-toc.xsl

bdubbs at linuxfromscratch.org bdubbs at linuxfromscratch.org
Sun May 23 09:39:23 PDT 2004


bdubbs      04/05/23 10:39:23

  Modified:    BOOK/stylesheets/xhtml lfs-toc.xsl
  Log:
  Change to stylesheet to provide toc links (from Manuel)
  
  Revision  Changes    Path
  1.2       +31 -17    BLFS/BOOK/stylesheets/xhtml/lfs-toc.xsl
  
  Index: lfs-toc.xsl
  ===================================================================
  RCS file: /home/cvsroot/BLFS/BOOK/stylesheets/xhtml/lfs-toc.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- lfs-toc.xsl	8 May 2004 02:42:12 -0000	1.1
  +++ lfs-toc.xsl	23 May 2004 16:39:23 -0000	1.2
  @@ -79,7 +79,7 @@
       </li>
     </xsl:template>
   
  -    <!--Adding the h* tags and dropping redundats links-->
  +    <!--Adding the h* tags -->
     <xsl:template name="toc.line">
       <xsl:param name="toc-context" select="."/>
       <xsl:param name="depth" select="1"/>
  @@ -97,26 +97,40 @@
         </xsl:when>
         <xsl:when test="local-name(.) = 'chapter' or local-name(.) = 'preface'">
           <h4>
  -          <xsl:variable name="label">
  -            <xsl:apply-templates select="." mode="label.markup"/>
  -          </xsl:variable>
  -          <xsl:copy-of select="$label"/>
  -          <xsl:if test="$label != ''">
  -            <xsl:value-of select="$autotoc.label.separator"/>
  -          </xsl:if>
  -          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  +          <a>
  +            <xsl:attribute name="href">
  +              <xsl:call-template name="href.target">
  +                <xsl:with-param name="context" select="$toc-context"/>
  +              </xsl:call-template>
  +            </xsl:attribute>
  +            <xsl:variable name="label">
  +              <xsl:apply-templates select="." mode="label.markup"/>
  +            </xsl:variable>
  +            <xsl:copy-of select="$label"/>
  +            <xsl:if test="$label != ''">
  +              <xsl:value-of select="$autotoc.label.separator"/>
  +            </xsl:if>
  +            <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  +          </a>
           </h4>
         </xsl:when>
         <xsl:when test="local-name(.) = 'part'">
           <h3>
  -          <xsl:variable name="label">
  -            <xsl:apply-templates select="." mode="label.markup"/>
  -          </xsl:variable>
  -          <xsl:copy-of select="$label"/>
  -          <xsl:if test="$label != ''">
  -            <xsl:value-of select="$autotoc.label.separator"/>
  -          </xsl:if>
  -          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  +          <a>
  +            <xsl:attribute name="href">
  +              <xsl:call-template name="href.target">
  +                <xsl:with-param name="context" select="$toc-context"/>
  +              </xsl:call-template>
  +            </xsl:attribute>
  +            <xsl:variable name="label">
  +              <xsl:apply-templates select="." mode="label.markup"/>
  +            </xsl:variable>
  +            <xsl:copy-of select="$label"/>
  +            <xsl:if test="$label != ''">
  +              <xsl:value-of select="$autotoc.label.separator"/>
  +            </xsl:if>
  +            <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  +          </a>
           </h3>
         </xsl:when>
         <xsl:otherwise>
  
  
  



More information about the blfs-book mailing list