Browse Source

Started BLFS templates integration.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/new-xsl@8048 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Manuel Canales Esparcia 18 years ago
parent
commit
74a7587f17
1 changed files with 22 additions and 0 deletions
  1. 22 0
      lfs-chunked.xsl

+ 22 - 0
lfs-chunked.xsl

@@ -22,4 +22,26 @@
   <xsl:include href="xhtml/lfs-legalnotice.xsl"/>
   <xsl:include href="xhtml/lfs-navigational.xsl"/>
 
+    <!-- sect1:
+           Prevent creation of dummy sect1 files used to emulate sub-chapters. -->
+    <!-- The original template is in {docbook-xsl}/xhtml/profile-chunk-code.xsl
+         It match also others sect* tags. The code for that tags is unchanged. -->
+  <xsl:template match="sect1">
+    <xsl:variable name="ischunk">
+      <xsl:call-template name="chunk"/>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="@role = 'dummy'"/>
+      <xsl:when test="not(parent::*)">
+        <xsl:call-template name="process-chunk-element"/>
+      </xsl:when>
+      <xsl:when test="$ischunk = 0">
+        <xsl:apply-imports/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="process-chunk-element"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
 </xsl:stylesheet>