cvs commit: LFS/BOOK/stylesheets/xhtml lfs-mixed.xsl

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Thu May 20 14:49:58 PDT 2004


manuel      04/05/20 15:49:58

  Modified:    BOOK/stylesheets Tag: b6_0 lfs-chunked.xsl
               BOOK/stylesheets/xhtml Tag: b6_0 lfs-mixed.xsl
  Added:       BOOK/stylesheets Tag: b6_0 lfs-chunked2.xsl lfs-nochunks.xsl
  Log:
  Branch b6_0: Stylesheets - reestructured the order of imports and includes.
  Added the nonchuk stylesheet from b5_1.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.4   +24 -20    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.4.3
  retrieving revision 1.1.4.4
  diff -u -r1.1.4.3 -r1.1.4.4
  --- lfs-chunked.xsl	19 May 2004 20:19:52 -0000	1.1.4.3
  +++ lfs-chunked.xsl	20 May 2004 21:49:58 -0000	1.1.4.4
  @@ -4,27 +4,31 @@
                   xmlns="http://www.w3.org/1999/xhtml"
                   version="1.0">
   
  -    <!-- 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'"/>
  -  
  -    <!-- 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"/>
  +  <xsl:import href="lfs-chunked2.xsl"/>
  +  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk-common.xsl"/>
  +  <xsl:include href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/manifest.xsl"/>
  +
  +    <!--  From the original chunk.xsl file:
  +
  +    Why is chunk-code now xsl:included?
  +
  +    Suppose you want to customize *both* the chunking algorithm used *and* the
  +    presentation of some elements that may be chunks. In order to do that, you
  +    must get the order of imports "just right". The answer is to make your own
  +    copy of this file, where you replace the initial import of "docbook.xsl"
  +    with an import of your own base.xsl (that does its own import of docbook.xsl).
   
  -    <!-- The CSS Stylesheet -->
  -  <xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/>
  +    Put the templates for changing the presentation of elements in your base.xsl.
   
  -    <!-- 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'"/>
  +    Put the templates that control chunking after the include of chunk-code.xsl.
  +
  +    Voila! (Man I hope we can do this better in XSLT 2.0)  -->
  +
  +  <xsl:include href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk-code.xsl"/>
  +
  +    <!-- Including our others customized chunks templates -->
  +  <xsl:include href="xhtml/lfs-legalnotice.xsl"/>
  +  <xsl:include href="xhtml/lfs-index.xsl"/>
  +  <xsl:include href="xhtml/lfs-navigational.xsl"/>
   
   </xsl:stylesheet>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +0 -0      LFS/BOOK/stylesheets/lfs-chunked2.xsl
  
  
  
  
  1.2.2.1   +0 -0      LFS/BOOK/stylesheets/lfs-nochunks.xsl
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.6   +55 -1     LFS/BOOK/stylesheets/xhtml/lfs-mixed.xsl
  
  Index: lfs-mixed.xsl
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/stylesheets/xhtml/lfs-mixed.xsl,v
  retrieving revision 1.1.4.5
  retrieving revision 1.1.4.6
  diff -u -r1.1.4.5 -r1.1.4.6
  --- lfs-mixed.xsl	19 May 2004 23:45:09 -0000	1.1.4.5
  +++ lfs-mixed.xsl	20 May 2004 21:49:58 -0000	1.1.4.6
  @@ -50,5 +50,59 @@
         </dl>
       </div>
     </xsl:template>
  -  
  +
  +    <!-- Body attributes -->
  +  <xsl:template name="body.attributes">
  +    <xsl:attribute name="id">
  +      <xsl:text>lfs</xsl:text>
  +    </xsl:attribute>
  +    <xsl:attribute name="class">
  +      <xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/>
  +    </xsl:attribute>
  +  </xsl:template>
  +
  +   <!-- Sect1 attributes -->
  +  <xsl:template match="sect1">
  +    <div>
  +      <xsl:choose>
  +        <xsl:when test="@role">
  +          <xsl:attribute name="class">
  +            <xsl:value-of select="@role"/>
  +          </xsl:attribute>
  +        </xsl:when>
  +        <xsl:otherwise>
  +          <xsl:attribute name="class">
  +            <xsl:value-of select="name(.)"/>
  +          </xsl:attribute>
  +        </xsl:otherwise>
  +      </xsl:choose>
  +      <xsl:call-template name="language.attribute"/>
  +      <xsl:call-template name="sect1.titlepage"/>
  +      <xsl:apply-templates/>
  +      <xsl:call-template name="process.chunk.footnotes"/>
  +    </div>
  +  </xsl:template>
  +
  +    <!-- Sect2 attributes -->
  +  <xsl:template match="sect2">
  +    <div>
  +      <xsl:choose>
  +        <xsl:when test="@role">
  +          <xsl:attribute name="class">
  +            <xsl:value-of select="@role"/>
  +          </xsl:attribute>
  +        </xsl:when>
  +        <xsl:otherwise>
  +          <xsl:attribute name="class">
  +            <xsl:value-of select="name(.)"/>
  +          </xsl:attribute>
  +        </xsl:otherwise>
  +      </xsl:choose>
  +      <xsl:call-template name="language.attribute"/>
  +      <xsl:call-template name="sect2.titlepage"/>
  +      <xsl:apply-templates/>
  +      <xsl:call-template name="process.chunk.footnotes"/>
  +    </div>
  +  </xsl:template>
  +
   </xsl:stylesheet>
  
  
  



More information about the lfs-book mailing list