Changeset a34ad80


Ignore:
Timestamp:
05/20/2004 09:48:55 PM (20 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
e7392f2
Parents:
678e79c
Message:

HEAD: Stylesheets - reestructured the order of imports and includes.
Added the nonchuk stylesheet from b5_1.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3681 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
stylesheets
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/lfs-chunked.xsl

    r678e79c ra34ad80  
    55                version="1.0">
    66
    7     <!-- We use XHTML -->
    8   <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk.xsl"/>
    9   <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
    10  
    11     <!-- Including our others customized templates -->
    12   <xsl:include href="xhtml/lfs-admon.xsl"/>
     7  <xsl:import href="lfs-chunked2.xsl"/>
     8  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk-common.xsl"/>
     9  <xsl:include href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/manifest.xsl"/>
     10
     11    <!--  From the original chunk.xsl file:
     12
     13    Why is chunk-code now xsl:included?
     14
     15    Suppose you want to customize *both* the chunking algorithm used *and* the
     16    presentation of some elements that may be chunks. In order to do that, you
     17    must get the order of imports "just right". The answer is to make your own
     18    copy of this file, where you replace the initial import of "docbook.xsl"
     19    with an import of your own base.xsl (that does its own import of docbook.xsl).
     20
     21    Put the templates for changing the presentation of elements in your base.xsl.
     22
     23    Put the templates that control chunking after the include of chunk-code.xsl.
     24
     25    Voila! (Man I hope we can do this better in XSLT 2.0)  -->
     26
     27  <xsl:include href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk-code.xsl"/>
     28
     29    <!-- Including our others customized chunks templates -->
     30  <xsl:include href="xhtml/lfs-legalnotice.xsl"/>
    1331  <xsl:include href="xhtml/lfs-index.xsl"/>
    14   <xsl:include href="xhtml/lfs-legalnotice.xsl"/>
    15   <xsl:include href="xhtml/lfs-mixed.xsl"/>
    1632  <xsl:include href="xhtml/lfs-navigational.xsl"/>
    17   <xsl:include href="xhtml/lfs-titles.xsl"/>
    18   <xsl:include href="xhtml/lfs-toc.xsl"/>
    19 
    20     <!-- The CSS Stylesheet -->
    21   <xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/>
    22 
    23     <!-- Dropping some unwanted style attributes -->
    24   <xsl:param name="ulink.target" select="''"></xsl:param>
    25   <xsl:param name="css.decoration" select="0"></xsl:param>
    26  
    27     <!-- No XML declaration -->
    28   <xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>
    2933
    3034</xsl:stylesheet>
  • stylesheets/xhtml/lfs-mixed.xsl

    r678e79c ra34ad80  
    5151    </div>
    5252  </xsl:template>
    53  
     53
     54    <!-- Body attributes -->
     55  <xsl:template name="body.attributes">
     56    <xsl:attribute name="id">
     57      <xsl:text>lfs</xsl:text>
     58    </xsl:attribute>
     59    <xsl:attribute name="class">
     60      <xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/>
     61    </xsl:attribute>
     62  </xsl:template>
     63
     64   <!-- Sect1 attributes -->
     65  <xsl:template match="sect1">
     66    <div>
     67      <xsl:choose>
     68        <xsl:when test="@role">
     69          <xsl:attribute name="class">
     70            <xsl:value-of select="@role"/>
     71          </xsl:attribute>
     72        </xsl:when>
     73        <xsl:otherwise>
     74          <xsl:attribute name="class">
     75            <xsl:value-of select="name(.)"/>
     76          </xsl:attribute>
     77        </xsl:otherwise>
     78      </xsl:choose>
     79      <xsl:call-template name="language.attribute"/>
     80      <xsl:call-template name="sect1.titlepage"/>
     81      <xsl:apply-templates/>
     82      <xsl:call-template name="process.chunk.footnotes"/>
     83    </div>
     84  </xsl:template>
     85
     86    <!-- Sect2 attributes -->
     87  <xsl:template match="sect2">
     88    <div>
     89      <xsl:choose>
     90        <xsl:when test="@role">
     91          <xsl:attribute name="class">
     92            <xsl:value-of select="@role"/>
     93          </xsl:attribute>
     94        </xsl:when>
     95        <xsl:otherwise>
     96          <xsl:attribute name="class">
     97            <xsl:value-of select="name(.)"/>
     98          </xsl:attribute>
     99        </xsl:otherwise>
     100      </xsl:choose>
     101      <xsl:call-template name="language.attribute"/>
     102      <xsl:call-template name="sect2.titlepage"/>
     103      <xsl:apply-templates/>
     104      <xsl:call-template name="process.chunk.footnotes"/>
     105    </div>
     106  </xsl:template>
     107
    54108</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.