瀏覽代碼

Small changes.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/new-xsl@8077 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Manuel Canales Esparcia 18 年之前
父節點
當前提交
93156010a7
共有 2 個文件被更改,包括 7 次插入7 次删除
  1. 2 3
      xhtml/lfs-sections.xsl
  2. 5 4
      xhtml/lfs-titles.xsl

+ 2 - 3
xhtml/lfs-sections.xsl

@@ -7,9 +7,8 @@
   <!-- This stylesheet controls how sections are handled -->
 
     <!-- Chunk the first top-level section? 1 = yes, 0 = no
-         If chapters TOC are generated, this must be 1.
-         See also sect1.titlepage template in lfs-titles.xsl -->
-  <xsl:param name="chunk.first.sections" select="1"></xsl:param>
+         If chapters TOC are generated, this must be 1. -->
+  <xsl:param name="chunk.first.sections" select="1"/>
 
     <!-- sect1:
            When there is a role attibute, use it as the class value.

+ 5 - 4
xhtml/lfs-titles.xsl

@@ -137,7 +137,8 @@
 
     <!-- bridgehead:
            When use always renderas attributes and want the output h* level
-           matching the defined sect* level. -->
+           matching the defined sect* level.
+           Create the anchor only if there is an @id. -->
     <!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
   <xsl:template match="bridgehead">
     <xsl:variable name="hlevel">
@@ -150,9 +151,9 @@
       </xsl:choose>
     </xsl:variable>
     <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
-      <xsl:call-template name="anchor">
-        <xsl:with-param name="conditional" select="0"/>
-      </xsl:call-template>
+      <xsl:if test="@id">
+        <a id="{@id}" name="{@id}"/>
+      </xsl:if>
       <xsl:apply-templates/>
     </xsl:element>
   </xsl:template>