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>.
This commit is contained in:
parent
ed335a3113
commit
0f4df7ccfd
1 changed files with 6 additions and 3 deletions
|
@ -538,16 +538,19 @@ echo "</xsl:text>
|
|||
<!-- Additional package information -->
|
||||
<!-- special cases for llvm -->
|
||||
<xsl:when test="contains(string(),'Recommended Download')">
|
||||
<xsl:apply-templates select="following-sibling::itemizedlist[1]"
|
||||
<xsl:apply-templates select="following-sibling::itemizedlist
|
||||
[preceding-sibling::bridgehead[1]=current()]"
|
||||
mode="additional"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(string(),'Optional Download')">
|
||||
<xsl:apply-templates select="following-sibling::itemizedlist"
|
||||
<xsl:apply-templates select="following-sibling::itemizedlist
|
||||
[preceding-sibling::bridgehead[1]=current()]"
|
||||
mode="additional"/>
|
||||
</xsl:when>
|
||||
<!-- All other additional packages have "Additional" -->
|
||||
<xsl:when test="contains(string(),'Additional')">
|
||||
<xsl:apply-templates select="following-sibling::itemizedlist"
|
||||
<xsl:apply-templates select="following-sibling::itemizedlist
|
||||
[preceding-sibling::bridgehead[1]=current()]"
|
||||
mode="additional"/>
|
||||
</xsl:when>
|
||||
<!-- Do not do anything if the dev has created another type of
|
||||
|
|
Reference in a new issue