瀏覽代碼

Fixed corss-references to <seg> tags.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/new-xsl@8096 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Manuel Canales Esparcia 18 年之前
父節點
當前提交
4b3429d57a
共有 3 個文件被更改,包括 13 次插入3 次删除
  1. 1 1
      blfs-pdf.xsl
  2. 9 2
      pdf/lfs-mixed.xsl
  3. 3 0
      xhtml/lfs-mixed.xsl

+ 1 - 1
blfs-pdf.xsl

@@ -9,7 +9,7 @@ $Date$
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version="1.0">
 
-    <!-- LFS top-level chunk templates. -->
+    <!-- LFS top-level pdf templates. -->
   <xsl:import href="lfs-pdf.xsl"/>
 
     <!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->

+ 9 - 2
pdf/lfs-mixed.xsl

@@ -98,6 +98,7 @@
           <xsl:when test="$keep.together != ''">
             <xsl:value-of select="$keep.together"/>
           </xsl:when>
+          <xsl:when test="$book-type = 'blfs'">auto</xsl:when>
           <xsl:otherwise>always</xsl:otherwise>
         </xsl:choose>
       </xsl:attribute>
@@ -271,7 +272,10 @@
            Adjust vertical space. -->
     <!-- The original template is in {docbook-xsl}/fo/list.xsl -->
   <xsl:template match="segmentedlist">
-    <fo:list-block provisional-distance-between-starts="12em"
+    <xsl:variable name="id">
+      <xsl:call-template name="object.id"/>
+    </xsl:variable>
+    <fo:list-block id="{$id}" provisional-distance-between-starts="12em"
                    provisional-label-separation="1em"
                    keep-together.within-column="always">
       <xsl:choose>
@@ -302,6 +306,9 @@
            found in {docbook-xsl}/fo/list.xsl
            Making segmentedlist an actual FO list to can indent items. -->
   <xsl:template match="seglistitem/seg">
+    <xsl:variable name="id">
+      <xsl:call-template name="object.id"/>
+    </xsl:variable>
     <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
     <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
     <xsl:variable name="segtitles" select="$seglist/segtitle"/>
@@ -316,7 +323,7 @@
         </fo:block>
       </fo:list-item-label>
       <fo:list-item-body start-indent="body-start()">
-        <fo:block>
+        <fo:block id="{$id}">
           <xsl:apply-templates/>
         </fo:block>
       </fo:list-item-body>

+ 3 - 0
xhtml/lfs-mixed.xsl

@@ -99,6 +99,9 @@
         </span>
       </strong>
       <span class="segbody">
+        <xsl:if test="@id">
+          <a id="{@id}" name="{@id}"/>
+        </xsl:if>
         <xsl:apply-templates/>
       </span>
     </div>