r8162 - in branches/new-xsl: . pdf xhtml

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Tue Jun 12 11:18:51 PDT 2007


Author: manuel
Date: 2007-06-12 12:18:51 -0600 (Tue, 12 Jun 2007)
New Revision: 8162

Added:
   branches/new-xsl/clfs-chunked.xsl
   branches/new-xsl/clfs-nochunks.xsl
   branches/new-xsl/clfs-pdf.xsl
Modified:
   branches/new-xsl/pdf/lfs-pagesetup.xsl
   branches/new-xsl/xhtml/lfs-navigational.xsl
   branches/new-xsl/xhtml/lfs-titles.xsl
Log:
Integrated CLFS.

Added: branches/new-xsl/clfs-chunked.xsl
===================================================================
--- branches/new-xsl/clfs-chunked.xsl	                        (rev 0)
+++ branches/new-xsl/clfs-chunked.xsl	2007-06-12 18:18:51 UTC (rev 8162)
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!--
+$LastChangedBy$
+$Date$
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+    <!-- LFS top-level chunk templates. -->
+  <xsl:import href="lfs-chunked.xsl"/>
+
+    <!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
+  <xsl:param name="book-type">clfs</xsl:param>
+
+</xsl:stylesheet>


Property changes on: branches/new-xsl/clfs-chunked.xsl
___________________________________________________________________
Name: svn:keywords
   + Author Date Revision Id

Added: branches/new-xsl/clfs-nochunks.xsl
===================================================================
--- branches/new-xsl/clfs-nochunks.xsl	                        (rev 0)
+++ branches/new-xsl/clfs-nochunks.xsl	2007-06-12 18:18:51 UTC (rev 8162)
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!--
+$LastChangedBy$
+$Date$
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+    <!-- LFS top-level no-chunk templates. -->
+  <xsl:import href="lfs-nochunks.xsl"/>
+
+    <!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
+  <xsl:param name="book-type">clfs</xsl:param>
+
+</xsl:stylesheet>


Property changes on: branches/new-xsl/clfs-nochunks.xsl
___________________________________________________________________
Name: svn:keywords
   + Author Date Revision Id

Added: branches/new-xsl/clfs-pdf.xsl
===================================================================
--- branches/new-xsl/clfs-pdf.xsl	                        (rev 0)
+++ branches/new-xsl/clfs-pdf.xsl	2007-06-12 18:18:51 UTC (rev 8162)
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!--
+$LastChangedBy$
+$Date$
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+    <!-- LFS top-level pdf templates. -->
+  <xsl:import href="lfs-pdf.xsl"/>
+
+    <!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
+  <xsl:param name="book-type">clfs</xsl:param>
+
+</xsl:stylesheet>


Property changes on: branches/new-xsl/clfs-pdf.xsl
___________________________________________________________________
Name: svn:keywords
   + Author Date Revision Id

Modified: branches/new-xsl/pdf/lfs-pagesetup.xsl
===================================================================
--- branches/new-xsl/pdf/lfs-pagesetup.xsl	2007-06-12 18:00:58 UTC (rev 8161)
+++ branches/new-xsl/pdf/lfs-pagesetup.xsl	2007-06-12 18:18:51 UTC (rev 8162)
@@ -77,7 +77,7 @@
   <xsl:param name="footer.rule" select="0"></xsl:param>
 
     <!-- Control depth of sections shown in running headers or footers.
-         Be sure that no uneeded fo:marker are generated. -->
+         Be sure that no unneeded fo:marker are generated. -->
   <xsl:param name="marker.section.level" select="-1"></xsl:param>
 
      <!-- Force package's sect1 onto a new page -->
@@ -116,7 +116,6 @@
 
     <!-- book title:
           Centered the title and removed unused code.
-          Added missing revhistory support.
           Removed book.titlepage.separator. -->
     <!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl -->
   <xsl:template name="book.titlepage">
@@ -128,14 +127,39 @@
       <fo:block>
         <xsl:call-template name="book.titlepage.before.verso"/>
         <xsl:call-template name="book.titlepage.verso"/>
-        <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
-                             select="bookinfo/revhistory"/>
       </fo:block>
     </fo:block>
   </xsl:template>
 
+    <!-- book titlepage verso:
+           Added missing bibliosource and revhistory support.
+           Removed unused code. -->
+    <!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl -->
+  <xsl:template name="book.titlepage.verso">
+    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
+    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
+    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
+    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
+    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
+    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/releaseinfo"/>
+    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
+    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
+    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/bibliosource"/>
+    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
+    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/revhistory"/>
+    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
+  </xsl:template>
+
+    <!-- bibliosource:
+           Self-made template to handle bibliosource when inside bookinfo. -->
+  <xsl:template match="bibliosource" mode="book.titlepage.verso.auto.mode">
+    <fo:block font-size="8pt">
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+
     <!-- part title:
-          Centered the title and removed unused code. -->
+           Centered the title and removed unused code. -->
     <!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl -->
   <xsl:template name="part.titlepage">
     <fo:block>
@@ -152,7 +176,7 @@
   </xsl:template>
 
     <!-- chapter title:
-          Small font size and left alignament. -->
+           Small font size and left alignament. -->
     <!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl -->
   <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
     <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style"

Modified: branches/new-xsl/xhtml/lfs-navigational.xsl
===================================================================
--- branches/new-xsl/xhtml/lfs-navigational.xsl	2007-06-12 18:00:58 UTC (rev 8161)
+++ branches/new-xsl/xhtml/lfs-navigational.xsl	2007-06-12 18:18:51 UTC (rev 8162)
@@ -108,6 +108,7 @@
       <xsl:if test="count($prev)>0 and $prev != $home">
         <li class="prev">
           <xsl:choose>
+
               <!-- If prev is a dummy sect1 that is the first one in a chapter,
                    links to the parent chapter.-->
             <xsl:when test="$prev[@role='dummy'] and
@@ -129,6 +130,7 @@
                 <xsl:value-of select="../title"/>
               </p>
             </xsl:when>
+
               <!-- If prev is a dummy sect1 that is not the first one in a chapter,
                    links to the previous sect1.-->
             <xsl:when test="$prev[@role='dummy'] and
@@ -150,6 +152,27 @@
                 <xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
               </p>
             </xsl:when>
+
+              <!-- Code for the "To Boot or To Chroot" CLFS links jumps. -->
+            <xsl:when test="$prev[@id='ch-chroot-devices'] or $prev[@id='ch-boot-whatnext']">
+              <a accesskey="p">
+                <xsl:attribute name="href">
+                  <xsl:call-template name="href.target">
+                    <xsl:with-param name="object" select="//sect1[@id='ch-temp-system-choose']"/>
+                  </xsl:call-template>
+                </xsl:attribute>
+                <xsl:attribute name="title">
+                  <xsl:value-of select="//sect1[@id='ch-temp-system-choose']/title"/>
+                </xsl:attribute>
+                <xsl:call-template name="navig.content">
+                  <xsl:with-param name="direction" select="'prev'"/>
+                </xsl:call-template>
+              </a>
+              <p>
+                <xsl:value-of select="//sect1[@id='ch-temp-system-choose']/title"/>
+              </p>
+            </xsl:when>
+
               <!-- Normal prev links -->
             <xsl:otherwise>
               <a accesskey="p">
@@ -172,10 +195,13 @@
           </xsl:choose>
         </li>
       </xsl:if>
-        <!-- Next link except in the last page -->
-      <xsl:if test="count($next)>0">
+
+
+        <!-- Next link except in the last page and in the CLFS "choose" page -->
+      <xsl:if test="count($next)>0 and (not(@id) or @id!='ch-temp-system-choose')">
         <li class="next">
           <xsl:choose>
+
               <!-- Current page is sect1 a next is a dummy sect1, link to the next one -->
             <xsl:when test="$next[@role='dummy'] and local-name(.) = 'sect1'">
               <a accesskey="n">
@@ -195,7 +221,8 @@
                 <xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
               </p>
             </xsl:when>
-              <!-- Current page is chapter a next is a dummy sect1, link to the next one -->
+
+              <!-- Current page is chapter and next is a dummy sect1, link to the next one -->
             <xsl:when test="$next[@role='dummy'] and local-name(.) = 'chapter'">
               <a accesskey="n">
                 <xsl:attribute name="href">
@@ -214,6 +241,27 @@
                 <xsl:value-of select="descendant::sect1[position()=2]/title"/>
               </p>
             </xsl:when>
+
+              <!-- Code for the "To Boot or To Chroot" CLFS links jumps. -->
+            <xsl:when test="$next[@id='chapter-chroot'] or $next[@id='chapter-boot']">
+              <a accesskey="n">
+                <xsl:attribute name="href">
+                  <xsl:call-template name="href.target">
+                    <xsl:with-param name="object" select="//part[@id='part5']"/>
+                  </xsl:call-template>
+                </xsl:attribute>
+                <xsl:attribute name="title">
+                  <xsl:value-of select="//part[@id='part5']/title"/>
+                </xsl:attribute>
+                <xsl:call-template name="navig.content">
+                  <xsl:with-param name="direction" select="'next'"/>
+                </xsl:call-template>
+              </a>
+              <p>
+                <xsl:value-of select="//part[@id='part5']/title"/>
+              </p>
+            </xsl:when>
+
               <!-- Normal next links. Take care of Index gentext support. -->
             <xsl:otherwise>
               <a accesskey="n">
@@ -254,6 +302,8 @@
           </xsl:choose>
         </li>
       </xsl:if>
+
+
       <li class="up">
         <xsl:choose>
             <!-- Up link except if up is home -->
@@ -278,6 +328,8 @@
           </xsl:otherwise>
         </xsl:choose>
       </li>
+
+
       <li class="home">
         <xsl:choose>
             <!-- No home link in home page -->

Modified: branches/new-xsl/xhtml/lfs-titles.xsl
===================================================================
--- branches/new-xsl/xhtml/lfs-titles.xsl	2007-06-12 18:00:58 UTC (rev 8161)
+++ branches/new-xsl/xhtml/lfs-titles.xsl	2007-06-12 18:18:51 UTC (rev 8162)
@@ -192,4 +192,19 @@
     </xsl:element>
   </xsl:template>
 
+    <!-- book.titlepage.verso:
+           Process bookinfo/bibliosource from here. -->
+    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
+  <xsl:template name="book.titlepage.verso">
+    <xsl:apply-templates select="bookinfo/bibliosource"/>
+  </xsl:template>
+
+    <!-- bookinfo/bibliosource:
+           Self-made template to handle bibliosource when inside bookinfo. -->
+  <xsl:template match="bookinfo/bibliosource">
+    <p class="copyright">
+      <xsl:apply-templates/>
+    </p>
+  </xsl:template>
+
 </xsl:stylesheet>




More information about the lfs-book mailing list