Changeset 5171adc for BOOK


Ignore:
Timestamp:
Mar 5, 2011, 9:00:40 PM (14 years ago)
Author:
Joe Ciccone <jciccone@…>
Children:
33cb2bd
Parents:
5508d22
Message:

Update the package-iterator in the stylesheet. Fixed an issue where
the default bits on a multilib system was the first in the list instead
of the last. Also simplified the xsl.

File:
1 edited

Legend:

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

    r5508d22 r5171adc  
    3737    <xsl:param name="multibuild" /> <!-- Do we need to install for each bitsize? -->
    3838    <xsl:param name="bits" /> <!-- Which bit sizes to create a package for -->
    39     <xsl:choose>
    40       <xsl:when test="$multibuild = 'true'">
    41         <xsl:variable name="currentbits" select="substring-before(concat($bits, ','), ',')" />
    42         <xsl:variable name="remainingbits" select="substring-after($bits, ',')" />
    43         <xsl:call-template name="package-stub">
    44           <xsl:with-param name="id" select="$id" />
    45           <xsl:with-param name="idsuffix">
    46             <xsl:if test="$remainingbits">
    47               <xsl:value-of select="concat('-', $currentbits)" />
    48             </xsl:if>
    49           </xsl:with-param>
    50           <xsl:with-param name="bits" select="substring-before(concat($bits, ','), ',')" />
    51           <xsl:with-param name="multi"><xsl:text>multi</xsl:text></xsl:with-param>
    52         </xsl:call-template>
    53         <xsl:if test="$remainingbits">
    54           <xsl:text>
    55 
    56           </xsl:text>
    57           <xsl:call-template name="package-iterator">
    58             <xsl:with-param name="id" select="$id" />
    59             <xsl:with-param name="multibuild" select="$multibuild" />
    60             <xsl:with-param name="bits" select="$remainingbits" />
    61           </xsl:call-template>
    62         </xsl:if>
    63       </xsl:when>
    64       <xsl:otherwise>
    65         <xsl:call-template name="package-stub">
    66           <xsl:with-param name="id" select="$id" />
    67           <xsl:with-param name="idsuffix" />
    68           <xsl:with-param name="bits" select="substring-before(concat($bits, ','), ',')" />
    69           <xsl:with-param name="multi"><xsl:text>single</xsl:text></xsl:with-param>
    70         </xsl:call-template>
    71       </xsl:otherwise>
    72     </xsl:choose>
     39
     40    <xsl:variable name="currentbits" select="substring-before(concat($bits, ','), ',')" />
     41    <xsl:variable name="remainingbits" select="substring-after($bits, ',')" />
     42
     43    <xsl:if test="not(boolean($remainingbits) and $multibuild = 'false')">
     44      <xsl:call-template name="package-stub">
     45        <xsl:with-param name="id" select="$id" />
     46        <xsl:with-param name="idsuffix">
     47          <xsl:if test="$remainingbits">
     48            <xsl:value-of select="concat('-', $currentbits)" />
     49          </xsl:if>
     50        </xsl:with-param>
     51        <xsl:with-param name="bits" select="substring-before(concat($bits, ','), ',')" />
     52        <xsl:with-param name="multi"><xsl:text>multi</xsl:text></xsl:with-param>
     53      </xsl:call-template>
     54    </xsl:if>
     55
     56    <xsl:if test="$remainingbits">
     57      <xsl:text>
     58
     59      </xsl:text>
     60      <xsl:call-template name="package-iterator">
     61        <xsl:with-param name="id" select="$id" />
     62        <xsl:with-param name="multibuild" select="$multibuild" />
     63        <xsl:with-param name="bits" select="$remainingbits" />
     64      </xsl:call-template>
     65    </xsl:if>
     66
    7367  </xsl:template>
    7468
Note: See TracChangeset for help on using the changeset viewer.