Ignore:
Timestamp:
10/08/2013 08:03:29 PM (11 years ago)
Author:
Matthew Burgess <matthew@…>
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, 12.2, 12.2-rc1, 7.5, 7.6, 7.7, 7.8, 7.9, 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/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
58675ce
Parents:
09a35dd
Message:

Update stylesheets to docbook-xsl-1.78.1.

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

File:
1 moved

Legend:

Unmodified
Added
Removed
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml-1_1/index.xsl

    r09a35dd r15c7d39  
    55
    66<!-- ********************************************************************
    7      $Id$
     7     $Id: index.xsl 9297 2012-04-22 03:56:16Z bobstayton $
    88     ********************************************************************
    99
     
    2727  <xsl:if test="count(*)&gt;0 or $generate.index != '0'">
    2828    <div>
    29       <xsl:apply-templates select="." mode="class.attribute"/>
    30       <xsl:if test="$generate.id.attributes != 0">
    31         <xsl:attribute name="id">
    32           <xsl:call-template name="object.id"/>
    33         </xsl:attribute>
    34       </xsl:if>
     29      <xsl:apply-templates select="." mode="common.html.attributes"/>
     30      <xsl:call-template name="id.attribute">
     31        <xsl:with-param name="conditional" select="0"/>
     32      </xsl:call-template>
    3533
    3634      <xsl:call-template name="index.titlepage"/>
     
    8280  <xsl:if test="count(*)&gt;0 or $generate.index != '0'">
    8381    <div>
    84       <xsl:apply-templates select="." mode="class.attribute"/>
    85       <xsl:if test="$generate.id.attributes != 0">
    86         <xsl:attribute name="id">
    87           <xsl:call-template name="object.id"/>
    88         </xsl:attribute>
    89       </xsl:if>
     82      <xsl:apply-templates select="." mode="common.html.attributes"/>
     83      <xsl:call-template name="id.attribute">
     84        <xsl:with-param name="conditional" select="0"/>
     85      </xsl:call-template>
    9086
    9187      <xsl:call-template name="setindex.titlepage"/>
     
    117113
    118114  <div>
    119     <xsl:apply-templates select="." mode="class.attribute"/>
    120     <xsl:if test="$generate.id.attributes != 0">
    121       <xsl:attribute name="id">
    122         <xsl:call-template name="object.id"/>
    123       </xsl:attribute>
    124     </xsl:if>
    125 
     115    <xsl:apply-templates select="." mode="common.html.attributes"/>
     116    <xsl:call-template name="id.attribute"/>
    126117    <xsl:call-template name="anchor"/>
    127118    <xsl:apply-templates select="*[not(self::indexentry)]"/>
     
    134125<xsl:template match="indexdiv/title">
    135126  <h3>
    136     <xsl:apply-templates select="." mode="class.attribute"/>
     127    <xsl:apply-templates select="." mode="common.html.attributes"/>
    137128    <xsl:apply-templates/>
    138129  </h3>
     
    163154    <xsl:apply-templates/>
    164155  </dt>
    165   <xsl:choose>
    166     <xsl:when test="following-sibling::secondaryie">
    167       <dd>
    168         <dl>
    169           <xsl:apply-templates select="following-sibling::secondaryie"/>
    170         </dl>
    171       </dd>
    172     </xsl:when>
    173     <xsl:when test="following-sibling::seeie                     |following-sibling::seealsoie">
    174       <dd>
    175         <dl>
    176           <xsl:apply-templates select="following-sibling::seeie                                        |following-sibling::seealsoie"/>
    177         </dl>
    178       </dd>
    179     </xsl:when>
    180   </xsl:choose>
    181 </xsl:template>
    182 
     156  <dd>
     157    <xsl:apply-templates select="following-sibling::seeie                                    [not(preceding-sibling::secondaryie)]" mode="indexentry"/>
     158    <xsl:apply-templates select="following-sibling::seealsoie                                    [not(preceding-sibling::secondaryie)]" mode="indexentry"/>
     159    <xsl:apply-templates select="following-sibling::secondaryie" mode="indexentry"/>
     160  </dd>
     161</xsl:template>
     162
     163<!-- Handled in mode to convert flat list to structured output -->
    183164<xsl:template match="secondaryie">
     165</xsl:template>
     166<xsl:template match="tertiaryie">
     167</xsl:template>
     168<xsl:template match="seeie|seealsoie">
     169</xsl:template>
     170
     171<xsl:template match="secondaryie" mode="indexentry">
     172  <dl>
     173    <dt>
     174      <xsl:apply-templates/>
     175    </dt>
     176    <dd>
     177      <!-- select following see* elements up to next secondaryie or tertiary or end -->
     178      <xsl:variable name="after.this" select="following-sibling::*"/>
     179      <xsl:variable name="next.entry" select="(following-sibling::secondaryie|following-sibling::tertiaryie)[1]"/>
     180      <xsl:variable name="before.entry" select="$next.entry/preceding-sibling::*"/>
     181      <xsl:variable name="see.intersection" select="$after.this[count(.|$before.entry) = count($before.entry)]                                 [self::seeie or self::seealsoie]"/>
     182      <xsl:choose>
     183        <xsl:when test="count($see.intersection) != 0">
     184          <xsl:apply-templates select="$see.intersection" mode="indexentry"/>
     185        </xsl:when>
     186        <xsl:when test="count($next.entry) = 0">
     187          <xsl:apply-templates select="following-sibling::seeie" mode="indexentry"/>
     188          <xsl:apply-templates select="following-sibling::seealsoie" mode="indexentry"/>
     189        </xsl:when>
     190      </xsl:choose>
     191
     192      <!-- now process any tertiaryie before the next secondaryie -->
     193      <xsl:variable name="before.next.secondary" select="following-sibling::secondaryie[1]/preceding-sibling::*"/>
     194      <xsl:variable name="tertiary.intersection" select="$after.this[count(.|$before.next.secondary) =                                   count($before.next.secondary)]                                 [not(self::seeie) and not(self::seealsoie)]"/>
     195      <xsl:choose>
     196        <xsl:when test="count($tertiary.intersection) != 0">
     197          <xsl:apply-templates select="$tertiary.intersection" mode="indexentry"/>
     198        </xsl:when>
     199        <xsl:when test="not(following-sibling::secondaryie)">
     200          <xsl:apply-templates select="following-sibling::tertiaryie" mode="indexentry"/>
     201        </xsl:when>
     202      </xsl:choose>
     203    </dd>
     204  </dl>
     205</xsl:template>
     206
     207<xsl:template match="tertiaryie" mode="indexentry">
     208  <dl>
     209    <dt>
     210      <xsl:apply-templates/>
     211    </dt>
     212    <dd>
     213      <!-- select following see* elements up to next secondaryie or tertiary or end -->
     214      <xsl:variable name="after.this" select="following-sibling::*"/>
     215      <xsl:variable name="next.entry" select="(following-sibling::secondaryie|following-sibling::tertiaryie)[1]"/>
     216      <xsl:variable name="before.entry" select="$next.entry/preceding-sibling::*"/>
     217      <xsl:variable name="see.intersection" select="$after.this[count(.|$before.entry) = count($before.entry)]                                 [self::seeie or self::seealsoie]"/>
     218      <xsl:choose>
     219        <xsl:when test="count($see.intersection) != 0">
     220          <xsl:apply-templates select="$see.intersection" mode="indexentry"/>
     221        </xsl:when>
     222        <xsl:when test="count($next.entry) = 0">
     223          <xsl:apply-templates select="following-sibling::seeie" mode="indexentry"/>
     224          <xsl:apply-templates select="following-sibling::seealsoie" mode="indexentry"/>
     225        </xsl:when>
     226      </xsl:choose>
     227    </dd>
     228  </dl>
     229</xsl:template>
     230
     231<xsl:template match="seeie" mode="indexentry">
    184232  <dt>
    185     <xsl:apply-templates/>
     233    <xsl:text>(</xsl:text>
     234    <xsl:call-template name="gentext">
     235      <xsl:with-param name="key" select="'see'"/>
     236    </xsl:call-template>
     237    <xsl:text> </xsl:text>
     238    <xsl:apply-templates/>
     239    <xsl:text>)</xsl:text>
    186240  </dt>
    187   <xsl:choose>
    188     <xsl:when test="following-sibling::tertiaryie">
    189       <dd>
    190         <dl>
    191           <xsl:apply-templates select="following-sibling::tertiaryie"/>
    192         </dl>
    193       </dd>
    194     </xsl:when>
    195     <xsl:when test="following-sibling::seeie                     |following-sibling::seealsoie">
    196       <dd>
    197         <dl>
    198           <xsl:apply-templates select="following-sibling::seeie                                        |following-sibling::seealsoie"/>
    199         </dl>
    200       </dd>
    201     </xsl:when>
    202   </xsl:choose>
    203 </xsl:template>
    204 
    205 <xsl:template match="tertiaryie">
    206   <dt>
    207     <xsl:apply-templates/>
    208   </dt>
    209   <xsl:if test="following-sibling::seeie                 |following-sibling::seealsoie">
    210     <dd>
    211       <dl>
    212         <xsl:apply-templates select="following-sibling::seeie                                      |following-sibling::seealsoie"/>
    213       </dl>
    214     </dd>
    215   </xsl:if>
    216 </xsl:template>
    217 
    218 <xsl:template match="seeie|seealsoie">
    219   <dt>
    220     <xsl:apply-templates/>
    221   </dt>
     241</xsl:template>
     242
     243<xsl:template match="seealsoie" mode="indexentry">
     244  <div>
     245    <xsl:text>(</xsl:text>
     246    <xsl:call-template name="gentext">
     247      <xsl:with-param name="key" select="'seealso'"/>
     248    </xsl:call-template>
     249    <xsl:text> </xsl:text>
     250    <xsl:apply-templates/>
     251    <xsl:text>)</xsl:text>
     252  </div>
    222253</xsl:template>
    223254
Note: See TracChangeset for help on using the changeset viewer.