Changeset c059c37 for stylesheets


Ignore:
Timestamp:
10/08/2004 09:53:27 PM (20 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
6.0
Children:
11e9988, 853917c
Parents:
2256873
Message:

patcheslist.xsl: skipped pdf truncated links.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/patcheslist.xsl

    r2256873 rc059c37  
    3333  <xsl:template match="//ulink">
    3434    <xsl:if test="contains(@url, '.patch') and contains(@url, '&patches-root;')">
    35       <xsl:text>  cp </xsl:text>
    36       <xsl:text>/home/httpd/</xsl:text>
    37       <xsl:value-of select="substring-before (substring-after ('&patches-root;', 'http://'), $links.directory)"/>
    38       <xsl:text>downloads/</xsl:text>
    39       <xsl:if test="contains (@url, '-')">
    40         <xsl:variable name="cut" select="translate (@url, '0123456789', '2222222222')"/>
    41         <xsl:choose>
    42           <xsl:when test="contains ($cut, ',')">
    43             <xsl:value-of select="substring-before (substring-after($cut, $links.directory), ',2')"/>
    44           </xsl:when>
    45           <xsl:otherwise>
     35      <xsl:choose>
     36        <xsl:when test="ancestor-or-self::*/@condition = 'pdf'"/>
     37        <xsl:otherwise>
     38          <xsl:text>  cp </xsl:text>
     39          <xsl:text>/home/httpd/</xsl:text>
     40          <xsl:value-of select="substring-before (substring-after ('&patches-root;', 'http://'), $links.directory)"/>
     41          <xsl:text>downloads/</xsl:text>
     42          <xsl:if test="contains (@url, '-')">
     43            <xsl:variable name="cut" select="translate (@url, '0123456789', '2222222222')"/>
    4644            <xsl:choose>
    47               <xsl:when test="contains ($cut, '-src-2')">
    48                 <xsl:value-of select="substring-before (substring-after($cut, $links.directory), '-src-2')"/>
     45              <xsl:when test="contains ($cut, ',')">
     46                <xsl:value-of select="substring-before (substring-after($cut, $links.directory), ',2')"/>
    4947              </xsl:when>
    5048              <xsl:otherwise>
    51                 <xsl:value-of select="substring-before (substring-after($cut, $links.directory), '-2')"/>
     49                <xsl:choose>
     50                  <xsl:when test="contains ($cut, '-src-2')">
     51                    <xsl:value-of select="substring-before (substring-after($cut, $links.directory), '-src-2')"/>
     52                  </xsl:when>
     53                  <xsl:otherwise>
     54                    <xsl:value-of select="substring-before (substring-after($cut, $links.directory), '-2')"/>
     55                  </xsl:otherwise>
     56                </xsl:choose>
    5257              </xsl:otherwise>
    5358            </xsl:choose>
    54           </xsl:otherwise>
    55         </xsl:choose>
    56       </xsl:if>
    57       <xsl:text>/</xsl:text>
    58       <xsl:value-of select="substring-after(@url, $links.directory)"/>
    59       <xsl:text> . &#x0a;</xsl:text>
     59          </xsl:if>
     60          <xsl:text>/</xsl:text>
     61          <xsl:value-of select="substring-after(@url, $links.directory)"/>
     62          <xsl:text> . &#x0a;</xsl:text>
     63        </xsl:otherwise>
     64      </xsl:choose>
    6065    </xsl:if>
    6166  </xsl:template>
Note: See TracChangeset for help on using the changeset viewer.