Changeset 869909a


Ignore:
Timestamp:
09/13/2019 05:00:08 PM (5 years ago)
Author:
Pierre Labastie <pieere@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 12.2, 9.1, gimp3, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/for-12.3, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/spidermonkey128, xry111/test-20220226, xry111/xf86-video-removal
Children:
aecbae4a
Parents:
f0baf5d9
Message:

Allows using system docbook-xsl stylesheets:

  • with a slight change of the css stylesheet, allows having the glossary title in the same style as the others
  • tested with docbook-xsl 1.78.1, 1.79.1, 1.79.2

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22137 af4574ff-66df-0310-9fd7-8a98e5e911e0

Files:
144 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    rf0baf5d9 r869909a  
    7777        $(Q)cp images/*.png $(BASEDIR)/images
    7878
    79         $(Q)cd $(BASEDIR)/; sed -e "s@../stylesheets@stylesheets@g" \
    80                            -e "s@../images@images@g"           \
     79        $(Q)cd $(BASEDIR)/; sed -e "s@../images@images@g"           \
    8180                           -i *.html
    8281
  • stylesheets/lfs-xsl/chunk-master.xsl

    rf0baf5d9 r869909a  
    1919
    2020    <!-- Upstream chunk code named templates -->
    21   <xsl:import href="docbook-xsl-snapshot/xhtml/chunk-common.xsl"/>
     21  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk-common.xsl"/>
    2222
    2323    <!-- Upstream chunk code match templates -->
    24   <xsl:include href="docbook-xsl-snapshot/xhtml/chunk-code.xsl"/>
     24  <xsl:include href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk-code.xsl"/>
    2525
    2626    <!-- Including our customized chunks templates -->
  • stylesheets/lfs-xsl/chunk-slave.xsl

    rf0baf5d9 r869909a  
    1414
    1515    <!-- Upstream XHTML presentation templates -->
    16   <xsl:import href="docbook-xsl-snapshot/xhtml/docbook.xsl"/>
     16  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
    1717
    1818    <!-- Use ISO-8859-1 for output instead of default UTF-8 -->
     
    2828  <xsl:include href="xhtml/lfs-xref.xsl"/>
    2929
    30     <!-- The CSS Stylesheets. We set here relative path from sub-dirs HTML files.
    31     The path from top-level HTML files (index.html, partX.html, etc) MUST be
    32     fixed via a sed in the Makefile-->
    33     <!-- Master CSS Stylesheet -->
    34   <xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/>
    35     <!-- Print CSS Stylesheet -->
    36     <!-- The original template is in {docbook-xsl}/xhtml/docbook.xsl -->
     30  <!-- The CSS Stylesheets. The path is relative to the top level html
     31       directory. The templates compute automatically the position of
     32       the CSS relative to the current file. So no need to fix the paths
     33       in the Makefile. -->
     34  <xsl:param name="html.stylesheet" select="'stylesheets/lfs.css'"/>
     35    <!-- Print CSS Stylesheet
     36    The original template is in {docbook-xsl}/xhtml/docbook.xsl -->
    3737  <xsl:template name='user.head.content'>
    3838     <link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css" media="print"/>
  • stylesheets/lfs-xsl/lfs.css

    rf0baf5d9 r869909a  
    9191}
    9292
    93 .preface h1, .part h1, .chapter h1, .appendix h1, .index h1, .sect1 h1 {
     93.preface h1, .part h1, .chapter h1, .appendix h1, .index h1, .sect1 h1, .glossary h1 {
    9494  background: #f5f6f7;
    9595  border-bottom: .1em solid #dbddec;
  • stylesheets/lfs-xsl/nochunks.xsl

    rf0baf5d9 r869909a  
    1414
    1515    <!-- Upstream XHTML templates -->
    16   <xsl:import href="docbook-xsl-snapshot/xhtml/docbook.xsl"/>
     16  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
    1717
    1818    <!-- Fix encoding issues with default UTF-8 output of the xhtml stylesheet -->
  • stylesheets/lfs-xsl/pdf.xsl

    rf0baf5d9 r869909a  
    1515    <!-- Upstream FO templates. Profiled version is not supported by
    1616         xsltproc, thus pofiling must be done in two steps (see Makefile) -->
    17   <xsl:import href="docbook-xsl-snapshot/fo/docbook.xsl"/>
     17  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
    1818
    1919    <!-- Uncomment the next for debugging the raw FO code.
  • stylesheets/lfs-xsl/profile.xsl

    rf0baf5d9 r869909a  
    1313
    1414  <!-- Include common profiling stylesheet -->
    15   <xsl:import href="docbook-xsl-snapshot/profiling/profile-mode.xsl"/>
     15  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/profiling/profile-mode.xsl"/>
    1616
    1717    <!-- This file must be included, because profile-mode is using
    1818         templates from it -->
    19   <xsl:import href="docbook-xsl-snapshot/common/stripns.xsl"/>
     19  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/common/stripns.xsl"/>
    2020
    2121    <!-- In the two pass processing there is no need for base URI fixup -->
  • stylesheets/lfs-xsl/xhtml/lfs-index.xsl

    rf0baf5d9 r869909a  
    3636  </xsl:template>
    3737
    38     <!-- The Index title in the longindex.html page:
    39            Removed a lot of code not useful for us.
    40            Forced h1 title size. -->
    41     <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
     38  <!-- The Index title in the longindex.html page:
     39         Removed a lot of code not useful for us.
     40         Forced h1 title size.
     41       The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl
     42  Use the original template now (as in LFS)
    4243  <xsl:template name="index.titlepage">
    4344    <h1 class="index">
     
    4647      </xsl:call-template>
    4748    </h1>
    48   </xsl:template>
     49  </xsl:template>-->
    4950
    5051    <!--Divisions:
     
    132133      </xsl:if>
    133134      <ul>
    134         <xsl:apply-templates select="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1])=1]"
    135                               mode="index-primary">
    136           <xsl:with-param name="scope" select="$scope"/>
    137           <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
    138         </xsl:apply-templates>
     135      <xsl:apply-templates select="key('letter', $key)[count(ancestor::node()|$scope) = count(ancestor::node())][count(.|key('primary', normalize-space(concat(primary/@sortas, &quot; &quot;, primary)))[count(ancestor::node()|$scope) = count(ancestor::node())][1])=1]" mode="index-primary">
     136        <xsl:with-param name="scope" select="$scope"/>
     137        <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
     138      </xsl:apply-templates>
    139139      </ul>
    140140    </xsl:if>
    141   </xsl:template>
    142 
    143     <!-- Dropping $term.separator and $number.separator from here.
    144          We add our customized ones in the output flow.
    145          As all our indexterm have @zone attributes, removed a lot of
    146          unused code. -->
    147     <!-- The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
    148   <xsl:template match="indexterm" mode="reference">
    149     <xsl:param name="scope" select="."/>
    150     <xsl:call-template name="reference">
    151       <xsl:with-param name="zones" select="normalize-space(@zone)"/>
    152       <xsl:with-param name="scope" select="$scope"/>
    153     </xsl:call-template>
    154141  </xsl:template>
    155142
     
    162149  <xsl:template match="indexterm" mode="index-primary">
    163150    <xsl:param name="scope" select="."/>
    164     <xsl:variable name="key" select="&primary;"/>
    165     <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
     151    <xsl:variable name="key" select="normalize-space(concat(primary/@sortas, &quot; &quot;, primary))"/>
     152    <xsl:variable name="refs" select="key('primary', $key)[count(ancestor::node()|$scope) = count(ancestor::node())]"/>
    166153    <li>
    167154      <strong class="item">
     
    178165      <xsl:if test="$refs/secondary">
    179166        <ul>
    180           <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]"
    181                                mode="index-secondary">
     167          <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &quot; &quot;, normalize-space(concat(secondary/@sortas, &quot; &quot;, secondary))))[count(ancestor::node()|$scope) = count(ancestor::node()) ][1]) = 1]" mode="index-secondary">
    182168            <xsl:with-param name="scope" select="$scope"/>
    183169            <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
     
    196182  <xsl:template match="indexterm" mode="index-secondary">
    197183    <xsl:param name="scope" select="."/>
    198     <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
    199     <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
     184    <xsl:variable name="key" select="concat(normalize-space(concat(primary/@sortas, &quot; &quot;, primary)), &quot; &quot;, normalize-space(concat(secondary/@sortas, &quot; &quot;, secondary)))"/>
     185    <xsl:variable name="refs" select="key('secondary', $key)[count(ancestor::node()|$scope) = count(ancestor::node())]"/>
    200186    <li>
    201187      <strong class="secitem">
     
    213199  </xsl:template>
    214200
    215     <!-- The target links:
    216            Changed links separator.
    217            On the second @zone link, we use a fixed string for the text
    218            with gentext support.
    219            Assume that there is no more than 2 @zone in a indexterm.
    220            Use href.target.uri named template to resolve the links. It is faster
    221            than the default href.target named template. -->
    222     <!-- The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
     201  <!-- Drop $term.separator and $number.separator from here as customized ones
     202       are added in the output flow.
     203       As all the indexterms in the book have @zone attributes, removed a lot of
     204       unused code.
     205       The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
     206  <xsl:template match="indexterm" mode="reference">
     207    <xsl:param name="scope" select="."/>
     208    <xsl:call-template name="reference">
     209      <xsl:with-param name="zones" select="normalize-space(@zone)"/>
     210      <xsl:with-param name="scope" select="$scope"/>
     211    </xsl:call-template>
     212  </xsl:template>
     213
     214  <!-- The target links:
     215       Changed link separator
     216       On the second @zone link, we use a fixed string for the text with gentext
     217       support.
     218       Assume that there are no more than 2 @zone in a indexterm.
     219       Use href.target.uri named template to resolve the links. It is faster
     220       than the default href.target named template.
     221       The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
    223222  <xsl:template name="reference">
    224223    <xsl:param name="scope" select="."/>
Note: See TracChangeset for help on using the changeset viewer.