浏览代码

Added a new book-type param that might help integrating all *LFS stylesheets and CSS code.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/new-xsl@8050 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Manuel Canales Esparcia 18 年之前
父节点
当前提交
488f23c83b
共有 3 个文件被更改,包括 15 次插入7 次删除
  1. 5 2
      lfs-chunked2.xsl
  2. 3 0
      lfs-nochunks.xsl
  3. 7 5
      xhtml/lfs-mixed.xsl

+ 5 - 2
lfs-chunked2.xsl

@@ -22,6 +22,9 @@
   <xsl:include href="xhtml/lfs-toc.xsl"/>
   <xsl:include href="xhtml/lfs-xref.xsl"/>
 
+    <!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
+  <xsl:param name="book-type">lfs</xsl:param>
+
     <!-- The CSS Stylesheets. We set here relative path from sub-dirs HTML files.
     The path from top-level HTML files (index.html, partX.html, etc) MUST be
     fixed via a sed in the Makefile-->
@@ -34,8 +37,8 @@
   </xsl:template>
 
     <!-- Dropping some unwanted style attributes -->
-  <xsl:param name="ulink.target" select="''"></xsl:param>
-  <xsl:param name="css.decoration" select="0"></xsl:param>
+  <xsl:param name="ulink.target" select="''"/>
+  <xsl:param name="css.decoration" select="0"/>
 
     <!-- No XML declaration -->
   <xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>

+ 3 - 0
lfs-nochunks.xsl

@@ -21,6 +21,9 @@
   <xsl:include href="xhtml/lfs-toc.xsl"/>
   <xsl:include href="xhtml/lfs-xref.xsl"/>
 
+    <!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
+  <xsl:param name="book-type">lfs</xsl:param>
+
     <!-- Control generation of ToCs and LoTs -->
   <xsl:param name="generate.toc">
     book      toc,title

+ 7 - 5
xhtml/lfs-mixed.xsl

@@ -120,14 +120,16 @@
   <!-- Named formating templates -->
 
     <!-- Body attributes:
-           Add to the body XHTML output tag an id attribute with the book type
-           and a class atribute with the book version. -->
+           Add to the body XHTML output tag a class attribute with the book type
+           and a id atribute with the book ty and version. -->
     <!-- The original template is in {docbook-xsl}/xhtml/docbook.xsl -->
   <xsl:template name="body.attributes">
-    <xsl:attribute name="id">
-      <xsl:text>lfs</xsl:text>
-    </xsl:attribute>
     <xsl:attribute name="class">
+      <xsl:value-of select="$book-type"/>
+    </xsl:attribute>
+    <xsl:attribute name="id">
+      <xsl:value-of select="$book-type"/>
+      <xsl:text>-</xsl:text>
       <xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/>
     </xsl:attribute>
   </xsl:template>