Changeset b04da2c


Ignore:
Timestamp:
05/01/2006 09:18:28 AM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
b3949ca3
Parents:
3932f297
Message:

Prevent creation of dummy HTML files.

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

Location:
stylesheets
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/blfs-chunked1.xsl

    r3932f297 rb04da2c  
    3232  <xsl:include href="xhtml/lfs-navigational.xsl"/>
    3333
     34  <!-- Prevent creation of dummy files -->
     35  <xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
     36    <xsl:variable name="ischunk">
     37      <xsl:call-template name="chunk"/>
     38    </xsl:variable>
     39    <xsl:choose>
     40      <xsl:when test="@role = 'dummy'"/>
     41      <xsl:when test="not(parent::*)">
     42        <xsl:call-template name="process-chunk-element"/>
     43      </xsl:when>
     44      <xsl:when test="$ischunk = 0">
     45        <xsl:apply-imports/>
     46      </xsl:when>
     47      <xsl:otherwise>
     48        <xsl:call-template name="process-chunk-element"/>
     49      </xsl:otherwise>
     50    </xsl:choose>
     51  </xsl:template>
     52
    3453</xsl:stylesheet>
  • stylesheets/xhtml/lfs-navigational.xsl

    r3932f297 rb04da2c  
    4141          <xsl:if test="count($prev)&gt;0 and $prev != $home">
    4242            <li class="prev">
    43               <a accesskey="p">
    44                 <xsl:attribute name="href">
    45                   <xsl:call-template name="href.target">
    46                     <xsl:with-param name="object" select="$prev"/>
    47                   </xsl:call-template>
    48                 </xsl:attribute>
    49                 <xsl:attribute name="title">
    50                   <xsl:value-of select="$prev/title"/>
    51                 </xsl:attribute>
    52                 <xsl:call-template name="navig.content">
    53                   <xsl:with-param name="direction" select="'prev'"/>
    54                 </xsl:call-template>
    55               </a>
    56               <p>
    57                 <xsl:value-of select="$prev/title"/>
    58               </p>
     43              <xsl:choose>
     44                <xsl:when test="$prev[@role='dummy']">
     45                  <a accesskey="p">
     46                    <xsl:attribute name="href">
     47                      <xsl:call-template name="href.target">
     48                        <xsl:with-param name="object" select="preceding-sibling::sect1[position()=2]"/>
     49                      </xsl:call-template>
     50                    </xsl:attribute>
     51                    <xsl:attribute name="title">
     52                      <xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
     53                    </xsl:attribute>
     54                    <xsl:call-template name="navig.content">
     55                      <xsl:with-param name="direction" select="'prev'"/>
     56                    </xsl:call-template>
     57                  </a>
     58                  <p>
     59                    <xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
     60                  </p>
     61                </xsl:when>
     62                <xsl:otherwise>
     63                  <a accesskey="p">
     64                    <xsl:attribute name="href">
     65                      <xsl:call-template name="href.target">
     66                        <xsl:with-param name="object" select="$prev"/>
     67                      </xsl:call-template>
     68                    </xsl:attribute>
     69                    <xsl:attribute name="title">
     70                      <xsl:value-of select="$prev/title"/>
     71                    </xsl:attribute>
     72                    <xsl:call-template name="navig.content">
     73                      <xsl:with-param name="direction" select="'prev'"/>
     74                    </xsl:call-template>
     75                  </a>
     76                  <p>
     77                    <xsl:value-of select="$prev/title"/>
     78                  </p>
     79                </xsl:otherwise>
     80              </xsl:choose>
    5981            </li>
    6082          </xsl:if>
    6183          <xsl:if test="count($next)&gt;0">
    6284            <li class="next">
    63               <a accesskey="n">
    64                 <xsl:attribute name="href">
    65                   <xsl:call-template name="href.target">
    66                     <xsl:with-param name="object" select="$next"/>
    67                   </xsl:call-template>
    68                 </xsl:attribute>
    69                 <xsl:attribute name="title">
    70                   <xsl:choose>
    71                     <xsl:when test="local-name($next)='index'">
    72                       <xsl:call-template name="gentext">
    73                         <xsl:with-param name="key">Index</xsl:with-param>
    74                       </xsl:call-template>
    75                     </xsl:when>
    76                     <xsl:otherwise>
    77                       <xsl:value-of select="$next/title"/>
    78                     </xsl:otherwise>
    79                   </xsl:choose>
    80                 </xsl:attribute>
    81                 <xsl:call-template name="navig.content">
    82                   <xsl:with-param name="direction" select="'next'"/>
    83                 </xsl:call-template>
    84               </a>
    85               <p>
    86                 <xsl:choose>
    87                   <xsl:when test="local-name($next)='index'">
    88                     <xsl:call-template name="gentext">
    89                       <xsl:with-param name="key">Index</xsl:with-param>
    90                     </xsl:call-template>
    91                   </xsl:when>
    92                   <xsl:otherwise>
    93                     <xsl:value-of select="$next/title"/>
    94                   </xsl:otherwise>
    95                 </xsl:choose>
    96               </p>
     85              <xsl:choose>
     86                <xsl:when test="$next[@role='dummy']">
     87                  <a accesskey="n">
     88                    <xsl:attribute name="href">
     89                      <xsl:call-template name="href.target">
     90                        <xsl:with-param name="object" select="following-sibling::sect1[position()=2]"/>
     91                      </xsl:call-template>
     92                    </xsl:attribute>
     93                    <xsl:attribute name="title">
     94                      <xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
     95                    </xsl:attribute>
     96                    <xsl:call-template name="navig.content">
     97                      <xsl:with-param name="direction" select="'next'"/>
     98                    </xsl:call-template>
     99                  </a>
     100                  <p>
     101                    <xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
     102                  </p>
     103                </xsl:when>
     104                <xsl:otherwise>
     105                  <a accesskey="n">
     106                    <xsl:attribute name="href">
     107                      <xsl:call-template name="href.target">
     108                        <xsl:with-param name="object" select="$next"/>
     109                      </xsl:call-template>
     110                    </xsl:attribute>
     111                    <xsl:attribute name="title">
     112                      <xsl:choose>
     113                        <xsl:when test="local-name($next)='index'">
     114                          <xsl:call-template name="gentext">
     115                            <xsl:with-param name="key">Index</xsl:with-param>
     116                          </xsl:call-template>
     117                        </xsl:when>
     118                        <xsl:otherwise>
     119                          <xsl:value-of select="$next/title"/>
     120                        </xsl:otherwise>
     121                      </xsl:choose>
     122                    </xsl:attribute>
     123                    <xsl:call-template name="navig.content">
     124                      <xsl:with-param name="direction" select="'next'"/>
     125                    </xsl:call-template>
     126                  </a>
     127                  <p>
     128                    <xsl:choose>
     129                      <xsl:when test="local-name($next)='index'">
     130                        <xsl:call-template name="gentext">
     131                          <xsl:with-param name="key">Index</xsl:with-param>
     132                        </xsl:call-template>
     133                      </xsl:when>
     134                      <xsl:otherwise>
     135                        <xsl:value-of select="$next/title"/>
     136                      </xsl:otherwise>
     137                    </xsl:choose>
     138                  </p>
     139                </xsl:otherwise>
     140              </xsl:choose>
    97141            </li>
    98142          </xsl:if>
     
    151195          <xsl:if test="count($prev)&gt;0 and $prev != $home">
    152196            <li class="prev">
    153               <a accesskey="p">
    154                 <xsl:attribute name="href">
    155                   <xsl:call-template name="href.target">
    156                     <xsl:with-param name="object" select="$prev"/>
    157                   </xsl:call-template>
    158                 </xsl:attribute>
    159                 <xsl:attribute name="title">
    160                   <xsl:value-of select="$prev/title"/>
    161                 </xsl:attribute>
    162                 <xsl:call-template name="navig.content">
    163                   <xsl:with-param name="direction" select="'prev'"/>
    164                 </xsl:call-template>
    165               </a>
    166               <p>
    167                 <xsl:value-of select="$prev/title"/>
    168               </p>
     197              <xsl:choose>
     198                <xsl:when test="$prev[@role='dummy']">
     199                  <a accesskey="p">
     200                    <xsl:attribute name="href">
     201                      <xsl:call-template name="href.target">
     202                        <xsl:with-param name="object" select="preceding-sibling::sect1[position()=2]"/>
     203                      </xsl:call-template>
     204                    </xsl:attribute>
     205                    <xsl:attribute name="title">
     206                      <xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
     207                    </xsl:attribute>
     208                    <xsl:call-template name="navig.content">
     209                      <xsl:with-param name="direction" select="'prev'"/>
     210                    </xsl:call-template>
     211                  </a>
     212                  <p>
     213                    <xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
     214                  </p>
     215                </xsl:when>
     216                <xsl:otherwise>
     217                  <a accesskey="p">
     218                    <xsl:attribute name="href">
     219                      <xsl:call-template name="href.target">
     220                        <xsl:with-param name="object" select="$prev"/>
     221                      </xsl:call-template>
     222                    </xsl:attribute>
     223                    <xsl:attribute name="title">
     224                      <xsl:value-of select="$prev/title"/>
     225                    </xsl:attribute>
     226                    <xsl:call-template name="navig.content">
     227                      <xsl:with-param name="direction" select="'prev'"/>
     228                    </xsl:call-template>
     229                  </a>
     230                  <p>
     231                    <xsl:value-of select="$prev/title"/>
     232                  </p>
     233                </xsl:otherwise>
     234              </xsl:choose>
    169235            </li>
    170236          </xsl:if>
    171237          <xsl:if test="count($next)&gt;0">
    172238            <li class="next">
    173               <a accesskey="n">
    174                 <xsl:attribute name="href">
    175                   <xsl:call-template name="href.target">
    176                     <xsl:with-param name="object" select="$next"/>
    177                   </xsl:call-template>
    178                 </xsl:attribute>
    179                 <xsl:attribute name="title">
    180                   <xsl:choose>
    181                     <xsl:when test="local-name($next)='index'">
    182                       <xsl:call-template name="gentext">
    183                         <xsl:with-param name="key">Index</xsl:with-param>
    184                       </xsl:call-template>
    185                     </xsl:when>
    186                     <xsl:otherwise>
    187                       <xsl:value-of select="$next/title"/>
    188                     </xsl:otherwise>
    189                   </xsl:choose>
    190                 </xsl:attribute>
    191                 <xsl:call-template name="navig.content">
    192                   <xsl:with-param name="direction" select="'next'"/>
    193                 </xsl:call-template>
    194               </a>
    195               <p>
    196                 <xsl:choose>
    197                   <xsl:when test="local-name($next)='index'">
    198                     <xsl:call-template name="gentext">
    199                       <xsl:with-param name="key">Index</xsl:with-param>
    200                     </xsl:call-template>
    201                   </xsl:when>
    202                   <xsl:otherwise>
    203                     <xsl:value-of select="$next/title"/>
    204                   </xsl:otherwise>
    205                 </xsl:choose>
    206               </p>
     239              <xsl:choose>
     240                <xsl:when test="$next[@role='dummy']">
     241                  <a accesskey="n">
     242                    <xsl:attribute name="href">
     243                      <xsl:call-template name="href.target">
     244                        <xsl:with-param name="object" select="following-sibling::sect1[position()=2]"/>
     245                      </xsl:call-template>
     246                    </xsl:attribute>
     247                    <xsl:attribute name="title">
     248                      <xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
     249                    </xsl:attribute>
     250                    <xsl:call-template name="navig.content">
     251                      <xsl:with-param name="direction" select="'next'"/>
     252                    </xsl:call-template>
     253                  </a>
     254                  <p>
     255                    <xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
     256                  </p>
     257                </xsl:when>
     258                <xsl:otherwise>
     259                  <a accesskey="n">
     260                    <xsl:attribute name="href">
     261                      <xsl:call-template name="href.target">
     262                        <xsl:with-param name="object" select="$next"/>
     263                      </xsl:call-template>
     264                    </xsl:attribute>
     265                    <xsl:attribute name="title">
     266                      <xsl:choose>
     267                        <xsl:when test="local-name($next)='index'">
     268                          <xsl:call-template name="gentext">
     269                            <xsl:with-param name="key">Index</xsl:with-param>
     270                          </xsl:call-template>
     271                        </xsl:when>
     272                        <xsl:otherwise>
     273                          <xsl:value-of select="$next/title"/>
     274                        </xsl:otherwise>
     275                      </xsl:choose>
     276                    </xsl:attribute>
     277                    <xsl:call-template name="navig.content">
     278                      <xsl:with-param name="direction" select="'next'"/>
     279                    </xsl:call-template>
     280                  </a>
     281                  <p>
     282                    <xsl:choose>
     283                      <xsl:when test="local-name($next)='index'">
     284                        <xsl:call-template name="gentext">
     285                          <xsl:with-param name="key">Index</xsl:with-param>
     286                        </xsl:call-template>
     287                      </xsl:when>
     288                      <xsl:otherwise>
     289                        <xsl:value-of select="$next/title"/>
     290                      </xsl:otherwise>
     291                    </xsl:choose>
     292                  </p>
     293                </xsl:otherwise>
     294              </xsl:choose>
    207295            </li>
    208296          </xsl:if>
     
    251339
    252340</xsl:stylesheet>
    253 
    254 
  • stylesheets/xhtml/lfs-sections.xsl

    r3932f297 rb04da2c  
    55                version="1.0">
    66
    7 
    8   <!-- Dummy sect1 files for TOC hacking -->
    9   <xsl:template match="sect1[@role='dummy']"/>
    10    
    117   <!-- Sect1 attributes -->
    128  <xsl:template match="sect1">
Note: See TracChangeset for help on using the changeset viewer.