소스 검색

Added anchors to titles.
Added dedication.titlepage.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/new-xsl@8053 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Manuel Canales Esparcia 18 년 전
부모
커밋
fd4f119d74
1개의 변경된 파일26개의 추가작업 그리고 0개의 파일을 삭제
  1. 26 0
      xhtml/lfs-titles.xsl

+ 26 - 0
xhtml/lfs-titles.xsl

@@ -12,6 +12,9 @@
     <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
   <xsl:template name="preface.titlepage">
     <div class="titlepage">
+      <xsl:if test="@id">
+        <a id="{@id}" name="{@id}"/>
+      </xsl:if>
       <h1 class="{name(.)}">
         <xsl:value-of select="title"/>
       </h1>
@@ -25,6 +28,9 @@
     <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
   <xsl:template name="part.titlepage">
     <div class="titlepage">
+      <xsl:if test="@id">
+        <a id="{@id}" name="{@id}"/>
+      </xsl:if>
       <h1 class="{name(.)}">
         <xsl:if test="$section.autolabel != 0">
           <xsl:apply-templates select="." mode="label.markup"/>
@@ -42,6 +48,9 @@
     <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
   <xsl:template name="appendix.titlepage">
     <div class="titlepage">
+      <xsl:if test="@id">
+        <a id="{@id}" name="{@id}"/>
+      </xsl:if>
       <h1 class="{name(.)}">
         <xsl:if test="$section.autolabel != 0">
           <xsl:apply-templates select="." mode="label.markup"/>
@@ -59,6 +68,9 @@
     <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
   <xsl:template name="chapter.titlepage">
     <div class="titlepage">
+      <xsl:if test="@id">
+        <a id="{@id}" name="{@id}"/>
+      </xsl:if>
       <h1 class="{name(.)}">
         <xsl:if test="$section.autolabel != 0">
           <xsl:apply-templates select="." mode="label.markup"/>
@@ -74,6 +86,9 @@
     <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
   <xsl:template name="sect1.titlepage">
     <div class="titlepage">
+      <xsl:if test="@id">
+        <a id="{@id}" name="{@id}"/>
+      </xsl:if>
       <h1 class="{name(.)}">
         <xsl:if test="$section.autolabel != 0">
           <xsl:apply-templates select="." mode="label.markup"/>
@@ -109,6 +124,17 @@
     </xsl:choose>
   </xsl:template>
 
+    <!-- dedication.titlepage:
+           Uses h2 and removed a lot of unneeded code. -->
+    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
+  <xsl:template name="dedication.titlepage">
+    <div class="titlepage">
+      <h2 class="{name(.)}">
+        <xsl:value-of select="title"/>
+      </h2>
+    </div>
+  </xsl:template>
+
     <!-- bridgehead:
            When use always renderas attributes and want the output h* level
            matching the defined sect* level. -->