Changeset 6d86eb1


Ignore:
Timestamp:
Apr 24, 2011, 12:14:19 PM (14 years ago)
Author:
Joe Ciccone <jciccone@…>
Children:
d4c109d
Parents:
b9c15a7
Message:

First only output the contents section on the last build in the series. Second apply a variant to the index of the page to show up as a secondary. As well as put the word size on the secondary index. Separating the 2 with a comma if needed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOOK/stylesheets/clfs-profile.xsl

    rb9c15a7 r6d86eb1  
    5151        <xsl:with-param name="bits" select="substring-before(concat($bits, ','), ',')" />
    5252        <xsl:with-param name="multibuild" select="$multibuild" />
     53        <xsl:with-param name="lastinseries">
     54          <xsl:choose>
     55            <xsl:when test="$remainingbits">
     56              <xsl:text>false</xsl:text>
     57            </xsl:when>
     58            <xsl:otherwise>
     59              <xsl:text>true</xsl:text>
     60            </xsl:otherwise>
     61          </xsl:choose>
     62        </xsl:with-param>
    5363      </xsl:call-template>
    5464    </xsl:if>
     
    7282    <xsl:param name="bits" /> <!-- Which bit sizes to create a package for -->
    7383    <xsl:param name="multibuild" /> <!-- Are there multiple instances of this package? -->
     84    <xsl:param name="lastinseries" /> <!-- Is this the past package in the multilib series? -->
    7485   
    7586    <!-- Translate the package into a sect1 -->
     
    144155          <xsl:value-of select="c:title" />
    145156        </xsl:element>
    146         <xsl:if test="(string-length($titlesuffix) + string-length(c:variant)) &gt; 0">
     157        <xsl:if test="(string-length($titlesuffix) &gt; 0 and $lastinseries = 'false') or c:variant">
    147158          <xsl:text>
    148159  </xsl:text>
    149160          <xsl:element name="secondary">
    150             <xsl:if test="string-length(c:variant) &gt; 0">
     161            <xsl:if test="c:variant">
    151162              <xsl:value-of select="c:variant" />
    152               <xsl:if test="string-length($titlesuffix) &gt; 0">
     163            </xsl:if>
     164            <xsl:if test="string-length($titlesuffix) &gt; 0 and $lastinseries = 'false'">
     165              <xsl:if test="c:variant">
    153166                <xsl:text>, </xsl:text>
    154167              </xsl:if>
     168              <xsl:value-of select="$titlesuffix" />
    155169            </xsl:if>
    156             <xsl:value-of select="$titlesuffix" />
    157170          </xsl:element>
    158171        </xsl:if>
     
    276289          </xsl:attribute>
    277290          <xsl:choose>
    278             <xsl:when test="string-length(@c:ref) > 0">
     291            <xsl:when test="string-length(@c:ref) > 0 or $lastinseries = 'false'">
    279292              <!-- Insert an xref to the actual contents list -->
    280293              <xsl:text>&#xa;  </xsl:text>
     
    285298              <xsl:element name="xref">
    286299                <xsl:attribute name="linkend">
    287                   <xsl:value-of select="@c:ref" />
     300                  <xsl:choose>
     301                    <xsl:when test="string-length(@c:ref) > 0">
     302                      <xsl:value-of select="@c:ref" />
     303                    </xsl:when>
     304                    <xsl:otherwise>
     305                      <xsl:value-of select="$id" />
     306                    </xsl:otherwise>
     307                  </xsl:choose>
    288308                  <xsl:text>-contents</xsl:text>
    289309                </xsl:attribute>
     
    594614        </xsl:element><!-- sect2 -->
    595615      </xsl:for-each><!-- c:contents -> sect2 -->
    596 
     616     
    597617      <xsl:text>&#xa;&#xa;</xsl:text>
    598618
Note: See TracChangeset for help on using the changeset viewer.