cvs commit: LFS/BOOK/stylesheets/xhtml lfs-admon.xsl lfs-legalnotice.xsl lfs-mixed.xsl lfs-navigational.xsl lfs-titles.xsl lfs-index.xsl lfs-toc.xsl

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sat May 8 07:13:23 PDT 2004


manuel      04/05/08 08:13:23

  Modified:    BOOK/stylesheets Tag: b6_0 lfs-chunked.xsl lfs-pdf.xsl
                        lfs.css
               BOOK/stylesheets/pdf Tag: b6_0 lfs-index.xsl
               BOOK/stylesheets/xhtml Tag: b6_0 lfs-index.xsl lfs-toc.xsl
  Added:       BOOK     Tag: b6_0 goTidy tidy.conf
               BOOK/stylesheets Tag: b6_0 lfs-print.xsl lfs-tex.xsl
                        patcheslist.xsl
               BOOK/stylesheets/pdf Tag: b6_0 lfs-pagesetup.xsl
               BOOK/stylesheets/print Tag: b6_0 lfs-index.xsl
                        lfs-pagesetup.xsl
               BOOK/stylesheets/xhtml Tag: b6_0 lfs-admon.xsl
                        lfs-legalnotice.xsl lfs-mixed.xsl
                        lfs-navigational.xsl lfs-titles.xsl
  Log:
  Updated the stylesheets to their current version.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.1   +17 -0     LFS/BOOK/Attic/goTidy
  
  
  
  
  1.1.4.1   +17 -0     LFS/BOOK/Attic/tidy.conf
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.1   +22 -81    LFS/BOOK/stylesheets/lfs-chunked.xsl
  
  Index: lfs-chunked.xsl
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/stylesheets/lfs-chunked.xsl,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- lfs-chunked.xsl	3 May 2004 10:33:11 -0000	1.1
  +++ lfs-chunked.xsl	8 May 2004 14:13:22 -0000	1.1.4.1
  @@ -1,92 +1,33 @@
  -<?xml version='1.0'?>
  +<?xml version='1.0' encoding='ISO-8859-1'?>
  +
  +<!-- Version 0.9 - Manuel Canales Esparcia <macana at lfs-es.org>
  +Based on the original lfs-chunked.xsl created by Matthew Burgess -->
  +
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns="http://www.w3.org/1999/xhtml"
                   version="1.0">
   
  -  <!-- We use XHTML -->
  +  	<!-- We use XHTML -->
     <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk.xsl"/>
     <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
  -
  -  <!-- The CSS Stylesheet -->
  -  <xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/>
  -
  -  <!-- Include our customised templates -->
  -  <xsl:include href="xhtml/lfs-toc.xsl"/>
  +  
  +  	<!-- Including our others customized templates -->
  +  <xsl:include href="xhtml/lfs-admon.xsl"/>
     <xsl:include href="xhtml/lfs-index.xsl"/>
  +  <xsl:include href="xhtml/lfs-legalnotice.xsl"/>
  +  <xsl:include href="xhtml/lfs-mixed.xsl"/>
  +  <xsl:include href="xhtml/lfs-navigational.xsl"/>
  +  <xsl:include href="xhtml/lfs-titles.xsl"/>
  +  <xsl:include href="xhtml/lfs-toc.xsl"/>
   
  -  <!-- Use graphics in admonitions -->
  -  <xsl:param name="admon.graphics" select="1"/>
  -  <xsl:param name="admon.graphics.path">../images/</xsl:param>
  -  <xsl:param name="admon.graphics.extension" select="'.png'"/>
  -
  -  <!-- Legal Notice stuff -->
  -  <xsl:param name="generate.legalnotice.link" select="1"/>
  -  <xsl:template match="legalnotice" mode="titlepage.mode">
  -    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  -    <xsl:choose>
  -      <xsl:when test="$generate.legalnotice.link != 0">
  -        <xsl:variable name="filename">
  -          <xsl:call-template name="make-relative-filename">
  -            <xsl:with-param name="base.dir" select="''"/>
  -            <xsl:with-param name="base.name" select="concat($base.dir, 'prologue/legalnotice.html')"/>
  -          </xsl:call-template>
  -        </xsl:variable>
  -        <xsl:variable name="title">
  -          <xsl:apply-templates select="." mode="title.markup"/>
  -        </xsl:variable>
  -        <xsl:element name="a">
  -          <xsl:attribute name="href">
  -            <xsl:value-of select="'prologue/legalnotice.html'"/>
  -          </xsl:attribute>
  -          <xsl:copy-of select="$title"/>
  -        </xsl:element>
  -        <xsl:call-template name="write.chunk">
  -          <xsl:with-param name="filename" select="$filename"/>
  -          <xsl:with-param name="quiet" select="$chunk.quietly"/>
  -          <xsl:with-param name="content">
  -            <html>
  -              <head>
  -                <xsl:call-template name="system.head.content"/>
  -                <xsl:call-template name="head.content"/>
  -                <xsl:call-template name="user.head.content"/>
  -              </head>
  -              <body>
  -                <xsl:call-template name="body.attributes"/>
  -                <div class="{local-name(.)}">
  -                  <xsl:apply-templates mode="titlepage.mode"/>
  -                </div>
  -              </body>
  -            </html>
  -          </xsl:with-param>
  -        </xsl:call-template>
  -      </xsl:when>
  -      <xsl:otherwise>
  -        <div class="{local-name(.)}">
  -          <xsl:apply-templates mode="titlepage.mode"/>
  -        </div>
  -      </xsl:otherwise>
  -    </xsl:choose>
  -  </xsl:template>
  +  	<!-- The CSS Stylesheet -->
  +  <xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/>
   
  -  <!--TOC stuff-->
  -  <xsl:param name="generate.toc">
  -    appendix  toc
  -    book      toc,title,figure,table,example,equation
  -    chapter   nop
  -    part      toc
  -    preface   nop
  -    qandadiv  nop
  -    qandaset  nop  
  -    reference nop
  -    sect1     nop
  -    sect2     nop
  -    sect3     nop
  -    sect4     nop
  -    sect5     nop
  -    section   nop
  -    set       nop
  -  </xsl:param>
  -  <xsl:param name="toc.section.depth">1</xsl:param>
  -  <xsl:param name="toc.max.depth">3</xsl:param>
  +  	<!-- Dropping some unwanted style attributes -->
  +  <xsl:param name="ulink.target" select="''"></xsl:param>
  +  <xsl:param name="css.decoration" select="0"></xsl:param>
  +  
  +  	<!-- No XML declaration -->
  +	<xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>
   
   </xsl:stylesheet>
  
  
  
  1.1.4.1   +30 -99    LFS/BOOK/stylesheets/lfs-pdf.xsl
  
  Index: lfs-pdf.xsl
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/stylesheets/lfs-pdf.xsl,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- lfs-pdf.xsl	3 May 2004 10:33:11 -0000	1.1
  +++ lfs-pdf.xsl	8 May 2004 14:13:23 -0000	1.1.4.1
  @@ -1,127 +1,58 @@
  -<?xml version='1.0'?>
  +<?xml version='1.0' encoding='ISO-8859-1'?>
  +
  +<!-- Version 0.9 - Manuel Canales Esparcia <macana at lfs-es.org>
  +Based on the original lfs-pdf.xsl created by Matthew Burgess -->
  +
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns:fo="http://www.w3.org/1999/XSL/Format"
  -                xmlns="http://www.w3.org/1999/xhtml"
                   version="1.0">
   
     <!-- We use FO and FOP as the processor -->
     <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/fo/docbook.xsl"/>
     <xsl:param name="fop.extensions" select="1"/>
     <xsl:param name="draft.mode" select="'no'"/>
  +
  +  <!-- Including our others customized templates -->
  +  <xsl:include href="pdf/lfs-index.xsl"/>
  +  <xsl:include href="pdf/lfs-pagesetup.xsl"/>
  +
     <!-- Probably want to make the paper size configurable -->
     <xsl:param name="paper.type" select="'A4'"/>
   
  -  <!-- Include our customised templates -->
  -  <xsl:include href="pdf/lfs-index.xsl"/>
  +  <!-- Don't hyphenate -->
  +  <xsl:param name="hyphenate">false</xsl:param>
  +  <xsl:param name="alignment">left</xsl:param>
   
     <!-- Font size -->
     <xsl:param name="body.font.master">8</xsl:param>
     <xsl:param name="body.font.size">10pt</xsl:param>
   
  -  <!-- Margins -->
  -  <xsl:param name="page.margin.inner">1in</xsl:param>
  -  <xsl:param name="page.margin.outer">0.5in</xsl:param>
  -  <xsl:param name="title.margin.left">-1pc</xsl:param>
  +  <!-- Graphics in admonitions -->
  +  <xsl:param name="admon.graphics" select="1"/>
  +  <xsl:param name="admon.graphics.path"
  +    select="'/usr/share/xml/docbook/xsl-stylesheets-1.65.1/images/'"/>
  +
  +  <!-- Shade screen -->
  +  <xsl:param name="shade.verbatim" select="1"/>
   
  -  <!-- TOC stuff -->
  +  <!-- TOC generation -->
     <xsl:param name="generate.toc">
       book      toc
       part      nop
     </xsl:param>
     <xsl:param name="toc.section.depth">1</xsl:param>
  -  <xsl:param name="generate.section.toc.level" select="-1"></xsl:param>
  -  <xsl:param name="toc.indent.width" select="18"></xsl:param>
  -
  -  <!-- Force section1's onto a new page -->
  -  <xsl:attribute-set name="section.level1.properties">
  -    <xsl:attribute name="break-after">page</xsl:attribute>
  -  </xsl:attribute-set>
  -
  -  <!-- Columns in appendix -->
  -  <xsl:param name="column.count.back" select="2"/>
  -
  -  <!-- Don't hyphenate -->
  -  <xsl:param name="hyphenate">false</xsl:param>
  -  <xsl:param name="alignment">left</xsl:param>
  +  <xsl:param name="generate.section.toc.level" select="-1"/>
  +  <xsl:param name="toc.indent.width" select="18"/>
   
     <!-- Page number in Xref-->
     <xsl:param name="insert.xref.page.number">yes</xsl:param>
  -  <xsl:template match="xref" name="xref">
  -    <xsl:variable name="targets" select="key('id', at linkend)"/>
  -    <xsl:variable name="target" select="$targets[1]"/>
  -    <xsl:variable name="refelem" select="local-name($target)"/>
  -    <xsl:call-template name="check.id.unique">
  -      <xsl:with-param name="linkend" select="@linkend"/>
  -    </xsl:call-template>
  -    <xsl:choose>
  -      <xsl:when test="$refelem=''">
  -        <xsl:message>
  -          <xsl:text>XRef to nonexistent id: </xsl:text>
  -          <xsl:value-of select="@linkend"/>
  -        </xsl:message>
  -        <xsl:text>???</xsl:text>
  -      </xsl:when>
  -      <xsl:when test="@endterm">
  -        <fo:basic-link internal-destination="{@linkend}"
  -                       xsl:use-attribute-sets="xref.properties">
  -          <xsl:variable name="etargets" select="key('id', at endterm)"/>
  -          <xsl:variable name="etarget" select="$etargets[1]"/>
  -          <xsl:choose>
  -            <xsl:when test="count($etarget) = 0">
  -              <xsl:message>
  -                <xsl:value-of select="count($etargets)"/>
  -                <xsl:text>Endterm points to nonexistent ID: </xsl:text>
  -                <xsl:value-of select="@endterm"/>
  -              </xsl:message>
  -              <xsl:text>???</xsl:text>
  -            </xsl:when>
  -            <xsl:otherwise>
  -              <xsl:apply-templates select="$etarget" mode="endterm"/>
  -            </xsl:otherwise>
  -          </xsl:choose>
  -        </fo:basic-link>
  -      </xsl:when>
  -      <xsl:when test="$target/@xreflabel">
  -        <fo:basic-link internal-destination="{@linkend}"
  -                       xsl:use-attribute-sets="xref.properties">
  -          <xsl:call-template name="xref.xreflabel">
  -            <xsl:with-param name="target" select="$target"/>
  -          </xsl:call-template>
  -        </fo:basic-link>
  -      </xsl:when>
  -      <xsl:otherwise>
  -        <fo:basic-link internal-destination="{@linkend}"
  -                       xsl:use-attribute-sets="xref.properties">
  -          <xsl:apply-templates select="$target" mode="xref-to">
  -            <xsl:with-param name="referrer" select="."/>
  -            <xsl:with-param name="xrefstyle">
  -              <xsl:choose>
  -                <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0">
  -                  <xsl:value-of select="@role"/>
  -                </xsl:when>
  -                <xsl:otherwise>
  -                  <xsl:value-of select="@xrefstyle"/>
  -                </xsl:otherwise>
  -              </xsl:choose>
  -            </xsl:with-param>
  -          </xsl:apply-templates>
  -        </fo:basic-link>
  -      </xsl:otherwise>
  -    </xsl:choose>
  -    <xsl:if test="not(starts-with(normalize-space(@xrefstyle), 'select:') != ''
  -                  and (contains(@xrefstyle, 'page')
  -                   or contains(@xrefstyle, 'Page')))
  -                  and ( $insert.xref.page.number = 'yes'
  -                   or $insert.xref.page.number = '1')
  -                   or local-name($target) = 'para'">
  -      <fo:basic-link internal-destination="{@linkend}"
  -                     xsl:use-attribute-sets="xref.properties">
  -      	<xsl:text>, p. </xsl:text>
  -        <xsl:apply-templates select="$target" mode="page.citation">
  -          <xsl:with-param name="id" select="@linkend"/>
  -        </xsl:apply-templates>
  -      </fo:basic-link>
  -    </xsl:if>
  +  <xsl:template match="*" mode="page.citation">
  +    <xsl:param name="id" select="'???'"/>
  +    <fo:inline keep-together.within-line="always">
  +      <xsl:text>[p.</xsl:text>
  +      <fo:page-number-citation ref-id="{$id}"/>
  +      <xsl:text>]</xsl:text>
  +    </fo:inline>
     </xsl:template>
   
     <!-- Prevent duplicate e-mails in the Acknowledgments pages-->
  
  
  
  1.1.4.1   +47 -43    LFS/BOOK/stylesheets/lfs.css
  
  Index: lfs.css
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/stylesheets/lfs.css,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- lfs.css	3 May 2004 10:33:11 -0000	1.1
  +++ lfs.css	8 May 2004 14:13:23 -0000	1.1.4.1
  @@ -1,24 +1,53 @@
   body {
     font-weight: normal;
  -  font-size: normal;
  +  font-size: medium;
     font-family: verdana, tahoma, helvetica, arial, sans-serif;
     text-align: left;
   }
   
  -div.navheader table {
  -    font-size: smaller;
  +.toc ul, .index ul {
  +	list-style: none;
  +}
  +
  +.navheader, .navfooter {
  +  font-size: smaller;
  +  text-align: center;
  +}
  +
  +.headerlinks {
  +  border-bottom : solid 2px green;
  +  padding-bottom: 0.5em;
  +}
  +
  +.navfooter {
  +  border-top : solid 2px green;
  +  padding-top: 0.5em;
  +  margin-top: 0.5em;
  +}
  +
  +.prev {
  +   float     : left;
  +   text-align: left;
  +   /* border    : solid 1px #ddd; */
  +   padding-left: 2em;
   }
   
  -div.navfooter table {
  -    font-size: smaller;
  +.next {
  +   float     : right;
  +   text-align: right;
  +   /* border    : solid 1px #0dd; */
  +   padding-right: 2em;
   }
   
  -div.navheader img {
  -    border: medium none;
  +.up {
  +   /* border : solid 1px #ff0; */
  +   width  : 10em;
  +   /* background-color: #bbb; */
  +   margin: 0px auto;
   }
   
  -div.navfooter img {
  -    border: medium none;
  +li.preface {
  +	margin-left: 2.5em;
   }
   
   div.book div.titlepage h1.title {
  @@ -68,40 +97,19 @@
       background-color: #dddddd;
   }
   
  -div.warning {
  -    border: 1px solid;
  -}
  -
  -div.note {
  -    border: 1px solid;
  -}
  -
  -div.important {
  -    border: 1px solid;
  -}
  -
  -div.caution {
  -    border: 1px solid;
  -}
  -
  -div.warning h3.title {
  -    text-align: center
  -}
  -
  -div.warning p {
  -    padding-left: 0.2in
  -}
  -
  -div.note {
  -    padding-left: 0.2in
  +div.admonition {
  +  border: medium solid;
  +  width: 90%;
  +  margin: .5em auto;
   }
   
  -div.important {
  -    padding-left: 0.2in
  +div.admonhead h3 {
  +	display: inline;
  +	margin-left: 1.5em;
   }
   
  -div.caution {
  -    padding-left: 0.2in
  +div.admonbody {
  +	margin: .5em;
   }
   
   .command {
  @@ -117,8 +125,4 @@
       font-weight: normal;
       width: 12.5em;
       float: left;
  -}
  -
  -.toc ul, .index ul, .navheader ul, .navfooter ul {
  -	list-style: none;
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.1   +57 -0     LFS/BOOK/stylesheets/Attic/lfs-print.xsl
  
  
  
  
  1.1.4.1   +78 -0     LFS/BOOK/stylesheets/Attic/lfs-tex.xsl
  
  
  
  
  1.1.4.1   +24 -0     LFS/BOOK/stylesheets/Attic/patcheslist.xsl
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.1   +113 -52   LFS/BOOK/stylesheets/pdf/lfs-index.xsl
  
  Index: lfs-index.xsl
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/stylesheets/pdf/lfs-index.xsl,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- lfs-index.xsl	3 May 2004 11:06:46 -0000	1.1
  +++ lfs-index.xsl	8 May 2004 14:13:23 -0000	1.1.4.1
  @@ -3,23 +3,22 @@
   <!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
   <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
   <!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
  +<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'>
   <!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
  +<!ENTITY sep '" "'>
   ]> 
   
  -<!-- Version 0.8.0 - Manuel Canales Esparcia <macana at lfs-es.org> -->
  +<!-- Version 0.9 - Manuel Canales Esparcia <macana at lfs-es.org> -->
   
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns:fo="http://www.w3.org/1999/XSL/Format"
                   version="1.0">
   
  -<!--Index Stuff-->
  -
  -  	<!--Only one column to fit the targets titles-->
  -  <xsl:param name="column.count.index" select="1"></xsl:param>
  +  	<!--Only one column to fit the table layout-->
  +  <xsl:param name="column.count.index" select="1"/>
   
       <!--Title-->
     <xsl:template match="index" mode="title.markup">
  -  	<xsl:param name="allow-anchors" select="0"/>
       <xsl:text>Index of packages and important installed files</xsl:text>
   	</xsl:template>
   
  @@ -38,47 +37,98 @@
                 <xsl:choose>
                   <xsl:when test="$divtitle = 'A'">
                     <xsl:text>Packages</xsl:text>
  -              </xsl:when>
  -              <xsl:when test="$divtitle = 'B'">
  -                  <xsl:text>Programs</xsl:text>
  -              </xsl:when>
  -              <xsl:when test="$divtitle = 'C'">
  -                  <xsl:text>Libraries</xsl:text>
  -              </xsl:when>
  -              <xsl:when test="$divtitle = 'D'">
  -                  <xsl:text>Scripts</xsl:text>
  -              </xsl:when>
  -              <xsl:when test="$divtitle = 'E'">
  -                  <xsl:text>Others</xsl:text>
  -              </xsl:when>
  -              <xsl:otherwise>
  -                <xsl:value-of select="$divtitle"/>
  -              </xsl:otherwise>
  -            </xsl:choose>
  +                </xsl:when>
  +                <xsl:when test="$divtitle = 'B'">
  +                    <xsl:text>Programs</xsl:text>
  +                </xsl:when>
  +                <xsl:when test="$divtitle = 'C'">
  +                    <xsl:text>Libraries</xsl:text>
  +                </xsl:when>
  +                <xsl:when test="$divtitle = 'D'">
  +                    <xsl:text>Scripts</xsl:text>
  +                </xsl:when>
  +                <xsl:when test="$divtitle = 'E'">
  +                    <xsl:text>Others</xsl:text>
  +                </xsl:when>
  +                <xsl:otherwise>
  +                  <xsl:value-of select="$divtitle"/>
  +                </xsl:otherwise>
  +            	</xsl:choose>
               </xsl:with-param>
             </xsl:call-template>
           </xsl:if>
  -        <fo:block>
  -          <xsl:apply-templates select="key('letter', $key)[&scope;]
  -                                      [count(.|key('primary', &primary;)[&scope;][1])=1]"
  -                              mode="index-primary">
  -            <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
  -            <xsl:with-param name="scope" select="$scope"/>
  -          </xsl:apply-templates>
  -        </fo:block>
  +        <fo:table table-layout="fixed" width="100%">
  +      		<fo:table-column column-number="1" column-width="11em"/>
  +      		<fo:table-column column-number="2" column-width="19em"/>
  +      		<fo:table-column column-number="3"/>
  +          <fo:table-body>
  +            <xsl:apply-templates select="key('letter', $key)[&scope;]
  +                                        [count(.|key('primary', &primary;)[&scope;][1])=1]"
  +                                mode="index-primary">
  +              <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
  +              <xsl:with-param name="scope" select="$scope"/>
  +            </xsl:apply-templates>
  +	        </fo:table-body>
  +        </fo:table>
         </fo:block>
       </xsl:if>
     </xsl:template>
   
  -  	<!-- The separator -->
  +  	<!-- Dropping the separator from here -->
     <xsl:template match="indexterm" mode="reference">
       <xsl:param name="scope" select="."/>
  -    <xsl:text>: </xsl:text>
       	<xsl:call-template name="reference">
           <xsl:with-param name="zones" select="normalize-space(@zone)"/>
           <xsl:with-param name="scope" select="$scope"/>
         </xsl:call-template>
     </xsl:template>
  +
  +  	<!-- Changing the output tags and re-addind the separator-->
  +  <xsl:template match="indexterm" mode="index-primary">
  +    <xsl:param name="scope" select="."/>
  +    <xsl:variable name="key" select="&primary;"/>
  +    <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
  +    <fo:table-row>
  +    	<fo:table-cell>
  +      	<fo:block>
  +          <xsl:value-of select="primary"/>
  +          <xsl:text>: </xsl:text>
  +				</fo:block>
  +      </fo:table-cell>
  +      <xsl:for-each select="$refs[not(see) and not(seealso)
  +                            and not(secondary)]">
  +        <xsl:apply-templates select="." mode="reference">
  +          <xsl:with-param name="scope" select="$scope"/>
  +        </xsl:apply-templates>
  +      </xsl:for-each>
  +		</fo:table-row>
  +		<xsl:if test="$refs/secondary">
  +      <xsl:apply-templates select="$refs[secondary and count(.|key('secondary',
  +      				concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" mode="index-secondary">
  +				<xsl:with-param name="scope" select="$scope"/>
  +				<xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
  +			</xsl:apply-templates>
  +		</xsl:if>
  +  </xsl:template>
  +
  +  <xsl:template match="indexterm" mode="index-secondary">
  +    <xsl:param name="scope" select="."/>
  + 		<xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
  +    <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
  +    <fo:table-row>
  +    	<fo:table-cell>
  +		    <fo:block start-indent="1pc">
  +          <xsl:value-of select="secondary"/>
  +          <xsl:text>: </xsl:text>
  +        </fo:block>
  +    	</fo:table-cell>
  +      <xsl:for-each select="$refs[not(see) and not(seealso) and not(tertiary)]">
  +        <xsl:apply-templates select="." mode="reference">
  +          <xsl:with-param name="scope" select="$scope"/>
  +        </xsl:apply-templates>
  +      </xsl:for-each>
  +		</fo:table-row>
  +  </xsl:template>
     
     	<!-- Targets titles and bookmarks-->
     <xsl:template name="reference">
  @@ -100,19 +150,26 @@
               <xsl:with-param name="object" select="$target2[1]"/>
             </xsl:call-template>
           </xsl:variable>
  -        <fo:basic-link internal-destination="{$id}">
  -          <xsl:value-of select="$target/title"/>
  -          <xsl:apply-templates select="$target" mode="page.citation">
  -          	<xsl:with-param name="id" select="$id"/>
  -          </xsl:apply-templates>
  -        </fo:basic-link>
  -          <xsl:text>, </xsl:text>
  -        <fo:basic-link internal-destination="{$id2}">
  -        	<xsl:text>description</xsl:text>
  -          <xsl:apply-templates select="$target2" mode="page.citation">
  -          	<xsl:with-param name="id" select="$id2"/>
  -          </xsl:apply-templates>
  -        </fo:basic-link>
  +        <fo:table-cell>
  +        	<fo:block>
  +            <fo:basic-link internal-destination="{$id}">
  +              <xsl:value-of select="$target/title"/>
  +              <xsl:apply-templates select="$target" mode="page.citation">
  +                <xsl:with-param name="id" select="$id"/>
  +              </xsl:apply-templates>
  +            </fo:basic-link>
  +        	</fo:block>
  +				</fo:table-cell>
  +        <fo:table-cell>
  +        	<fo:block>
  +            <fo:basic-link internal-destination="{$id2}">
  +              <xsl:text>description</xsl:text>
  +              <xsl:apply-templates select="$target2" mode="page.citation">
  +                <xsl:with-param name="id" select="$id2"/>
  +              </xsl:apply-templates>
  +            </fo:basic-link>
  +        	</fo:block>
  +				</fo:table-cell>
         </xsl:when>
         <xsl:otherwise>
           <xsl:variable name="zone" select="$zones"/>
  @@ -122,12 +179,16 @@
               <xsl:with-param name="object" select="$target[1]"/>
             </xsl:call-template>
           </xsl:variable>
  -        <fo:basic-link internal-destination="{$id}">
  -          <xsl:value-of select="$target/title"/>
  -          <xsl:apply-templates select="$target" mode="page.citation">
  -          	<xsl:with-param name="id" select="$id"/>
  -          </xsl:apply-templates>
  -        </fo:basic-link>
  +        <fo:table-cell>
  +        	<fo:block>
  +            <fo:basic-link internal-destination="{$id}">
  +              <xsl:value-of select="$target/title"/>
  +              <xsl:apply-templates select="$target" mode="page.citation">
  +                <xsl:with-param name="id" select="$id"/>
  +              </xsl:apply-templates>
  +            </fo:basic-link>
  +        	</fo:block>
  +				</fo:table-cell>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:template>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.1   +115 -0    LFS/BOOK/stylesheets/pdf/Attic/lfs-pagesetup.xsl
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.1   +127 -0    LFS/BOOK/stylesheets/print/Attic/lfs-index.xsl
  
  
  
  
  1.1.4.1   +120 -0    LFS/BOOK/stylesheets/print/Attic/lfs-pagesetup.xsl
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.1   +16 -5     LFS/BOOK/stylesheets/xhtml/lfs-index.xsl
  
  Index: lfs-index.xsl
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/stylesheets/xhtml/lfs-index.xsl,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- lfs-index.xsl	3 May 2004 11:06:46 -0000	1.1
  +++ lfs-index.xsl	8 May 2004 14:13:23 -0000	1.1.4.1
  @@ -6,24 +6,31 @@
   <!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
   ]>
   
  -<!-- Version 0.8.0 - Manuel Canales Esparcia <macana at lfs-es.org> -->
  +<!-- Version 0.9 - Manuel Canales Esparcia <macana at lfs-es.org> -->
   
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns="http://www.w3.org/1999/xhtml"
                   version="1.0">
   
  -	<!--Index Stuff-->
  -
       <!--Filename-->
     <xsl:template match="index" mode="recursive-chunk-filename">
       <xsl:text>longindex.html</xsl:text>
     </xsl:template>
   
       <!--Title-->
  +  <xsl:param name="index-title">Index of packages and important installed files</xsl:param>
  +  
     <xsl:template match="index" mode="title.markup">
  -  	<xsl:param name="allow-anchors" select="0"/>
  -    <xsl:text>Index of packages and important installed files</xsl:text>
  +    <xsl:value-of select="$index-title"/>
   	</xsl:template>
  +  
  +  <xsl:template name="index.titlepage">
  +    <div class="titlepage">
  +    	<h1 class="index">
  +    		<xsl:value-of select="$index-title"/>
  +			</h1>
  +    </div>
  +  </xsl:template>
   
     	<!--Divisions-->
     <xsl:template match="indexterm" mode="index-div">
  @@ -109,6 +116,7 @@
       	</xsl:if>
       </li>
     </xsl:template>
  +
     <xsl:template match="indexterm" mode="index-secondary">
       <xsl:param name="scope" select="."/>
       <xsl:variable name="key" select="concat(&primary;, " ",
  @@ -173,5 +181,8 @@
         </xsl:otherwise>
       </xsl:choose>
     </xsl:template>
  +  
  +    <!-- Dropping unneeded anchors -->
  +  <xsl:template match="indexterm"/>
   
   </xsl:stylesheet>
  
  
  
  1.1.4.1   +88 -54    LFS/BOOK/stylesheets/xhtml/lfs-toc.xsl
  
  Index: lfs-toc.xsl
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/stylesheets/xhtml/lfs-toc.xsl,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- lfs-toc.xsl	3 May 2004 11:06:46 -0000	1.1
  +++ lfs-toc.xsl	8 May 2004 14:13:23 -0000	1.1.4.1
  @@ -1,13 +1,12 @@
   <?xml version='1.0' encoding='ISO-8859-1'?>
   
  -<!-- Version 0.8.0 - Manuel Canales Esparcia <macana at lfs-es.org> -->
  +<!-- Version 0.9 - Manuel Canales Esparcia <macana at lfs-es.org> -->
   
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns="http://www.w3.org/1999/xhtml"
                   version="1.0">
  -
  -
  -<!--TOC stuff-->
  +                
  +		<!-- General settings -->
     <xsl:param name="generate.toc">
       appendix  toc
       book      toc,title,figure,table,example,equation
  @@ -29,9 +28,56 @@
     <xsl:param name="toc.section.depth">1</xsl:param>
   
     <xsl:param name="toc.max.depth">3</xsl:param>
  -
  -    <!-- Type of list-->
  -  <xsl:param name="toc.list.type">ul</xsl:param>
  +  
  +  	<!-- Making the TOC -->
  +	<xsl:template name="make.toc">
  +    <xsl:param name="toc-context" select="."/>
  +    <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
  +    <xsl:if test="$nodes">
  +      <div class="toc">
  +        <h3>
  +          <xsl:call-template name="gentext">
  +            <xsl:with-param name="key">TableofContents</xsl:with-param>
  +          </xsl:call-template>
  +        </h3>
  +        <ul>
  +          <xsl:apply-templates select="$nodes" mode="toc">
  +            <xsl:with-param name="toc-context" select="$toc-context"/>
  +          </xsl:apply-templates>
  +        </ul>
  +      </div>
  +    </xsl:if>
  +  </xsl:template>
  +	
  +    <!-- Making the subtocs -->
  +  <xsl:template name="subtoc">
  +    <xsl:param name="toc-context" select="."/>
  +    <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
  +    <xsl:variable name="subtoc">
  +      <ul>
  +        <xsl:apply-templates mode="toc" select="$nodes">
  +          <xsl:with-param name="toc-context" select="$toc-context"/>
  +        </xsl:apply-templates>
  +      </ul>
  +    </xsl:variable>
  +    <xsl:variable name="depth">
  +      <xsl:choose>
  +        <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
  +        <xsl:otherwise>0</xsl:otherwise>
  +      </xsl:choose>
  +    </xsl:variable>
  +    <xsl:variable name="depth.from.context"
  +            select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
  +    <li class="{name(.)}">
  +      <xsl:call-template name="toc.line">
  +        <xsl:with-param name="toc-context" select="$toc-context"/>
  +      </xsl:call-template>
  +      <xsl:if test="$toc.section.depth > $depth and count($nodes)>0 
  +      				and $toc.max.depth > $depth.from.context">
  +        <xsl:copy-of select="$subtoc"/>
  +      </xsl:if>
  +    </li>
  +  </xsl:template>
   
       <!--Adding the h* tags and dropping redundats links-->
     <xsl:template name="toc.line">
  @@ -40,37 +86,47 @@
       <xsl:param name="depth.from.context" select="8"/>
       <xsl:choose>
         <xsl:when test="local-name(.) = 'sect1'">
  -        <span>
  -          <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
  -          <a>
  -            <xsl:attribute name="href">
  -              <xsl:call-template name="href.target">
  -                <xsl:with-param name="context" select="$toc-context"/>
  -              </xsl:call-template>
  -            </xsl:attribute>
  -            <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  -          </a>
  -        </span>
  +        <a>
  +          <xsl:attribute name="href">
  +            <xsl:call-template name="href.target">
  +              <xsl:with-param name="context" select="$toc-context"/>
  +            </xsl:call-template>
  +          </xsl:attribute>
  +          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  +        </a>
         </xsl:when>
         <xsl:when test="local-name(.) = 'chapter' or local-name(.) = 'preface'">
           <h4>
  -          <span>
  -            <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
  -            <xsl:variable name="label">
  -              <xsl:apply-templates select="." mode="label.markup"/>
  -            </xsl:variable>
  -            <xsl:copy-of select="$label"/>
  -            <xsl:if test="$label != ''">
  -              <xsl:value-of select="$autotoc.label.separator"/>
  -            </xsl:if>
  -            <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  -          </span>
  +          <xsl:variable name="label">
  +            <xsl:apply-templates select="." mode="label.markup"/>
  +          </xsl:variable>
  +          <xsl:copy-of select="$label"/>
  +          <xsl:if test="$label != ''">
  +            <xsl:value-of select="$autotoc.label.separator"/>
  +          </xsl:if>
  +          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
           </h4>
         </xsl:when>
         <xsl:when test="local-name(.) = 'part'">
           <h3>
  -          <span>
  -            <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
  +          <xsl:variable name="label">
  +            <xsl:apply-templates select="." mode="label.markup"/>
  +          </xsl:variable>
  +          <xsl:copy-of select="$label"/>
  +          <xsl:if test="$label != ''">
  +            <xsl:value-of select="$autotoc.label.separator"/>
  +          </xsl:if>
  +          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  +        </h3>
  +      </xsl:when>
  +      <xsl:otherwise>
  +        <h3>
  +            <a>
  +            <xsl:attribute name="href">
  +              <xsl:call-template name="href.target">
  +                <xsl:with-param name="context" select="$toc-context"/>
  +              </xsl:call-template>
  +            </xsl:attribute>
               <xsl:variable name="label">
                 <xsl:apply-templates select="." mode="label.markup"/>
               </xsl:variable>
  @@ -79,29 +135,7 @@
                 <xsl:value-of select="$autotoc.label.separator"/>
               </xsl:if>
               <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  -          </span>
  -        </h3>
  -      </xsl:when>
  -      <xsl:otherwise>
  -        <h3>
  -          <span>
  -            <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
  -            <a>
  -              <xsl:attribute name="href">
  -                <xsl:call-template name="href.target">
  -                  <xsl:with-param name="context" select="$toc-context"/>
  -                </xsl:call-template>
  -              </xsl:attribute>
  -              <xsl:variable name="label">
  -                <xsl:apply-templates select="." mode="label.markup"/>
  -              </xsl:variable>
  -              <xsl:copy-of select="$label"/>
  -              <xsl:if test="$label != ''">
  -                <xsl:value-of select="$autotoc.label.separator"/>
  -              </xsl:if>
  -              <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  -            </a>
  -          </span>
  +          </a>
           </h3>
         </xsl:otherwise>
       </xsl:choose>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.1   +47 -0     LFS/BOOK/stylesheets/xhtml/Attic/lfs-admon.xsl
  
  
  
  
  1.1.4.1   +76 -0     LFS/BOOK/stylesheets/xhtml/Attic/lfs-legalnotice.xsl
  
  
  
  
  1.1.4.1   +39 -0     LFS/BOOK/stylesheets/xhtml/Attic/lfs-mixed.xsl
  
  
  
  
  1.1.4.1   +150 -0    LFS/BOOK/stylesheets/xhtml/Attic/lfs-navigational.xsl
  
  
  
  
  1.1.4.1   +80 -0     LFS/BOOK/stylesheets/xhtml/Attic/lfs-titles.xsl
  
  
  
  



More information about the lfs-book mailing list