Changeset 0f4df7c for BLFS/xsl


Ignore:
Timestamp:
11/18/2022 02:45:42 PM (20 months ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, trunk
Children:
33ee66c
Parents:
ed335a31
git-author:
Pierre Labastie <pierre.labastie@…> (11/18/2022 02:36:07 PM)
git-committer:
Pierre Labastie <pierre.labastie@…> (11/18/2022 02:45:42 PM)
Message:

BLFS tools: don't generate duplicate download code

For additional downloads, the normal book layout is a <bridgehead>
containing "Additional Downloads" followed by one or more
<itemizedlist>, one for each file to download. But on some pages,
there are several <bridgehead>, each followed by one or more
<itemizedlist>. So we have to check that only the <itemizedlist>
correponding to the current <bridgehead> are treated. Otherwise,
the download code may be generated more than once. This imposes
that no other bridgehead is inserted between the one containing
"Additional" (or in some case "Recommended/Optional Download") and
the <itemizedlist>.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/xsl/scripts.xsl

    red335a31 r0f4df7c  
    539539      <!-- special cases for llvm -->
    540540      <xsl:when test="contains(string(),'Recommended Download')">
    541         <xsl:apply-templates select="following-sibling::itemizedlist[1]"
     541        <xsl:apply-templates select="following-sibling::itemizedlist
     542                             [preceding-sibling::bridgehead[1]=current()]"
    542543                             mode="additional"/>
    543544      </xsl:when>
    544545      <xsl:when test="contains(string(),'Optional Download')">
    545         <xsl:apply-templates select="following-sibling::itemizedlist"
     546        <xsl:apply-templates select="following-sibling::itemizedlist
     547                             [preceding-sibling::bridgehead[1]=current()]"
    546548                             mode="additional"/>
    547549      </xsl:when>
    548550      <!-- All other additional packages have "Additional" -->
    549551      <xsl:when test="contains(string(),'Additional')">
    550         <xsl:apply-templates select="following-sibling::itemizedlist"
     552        <xsl:apply-templates select="following-sibling::itemizedlist
     553                             [preceding-sibling::bridgehead[1]=current()]"
    551554                             mode="additional"/>
    552555      </xsl:when>
Note: See TracChangeset for help on using the changeset viewer.