aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets
diff options
context:
space:
mode:
authorManuel Canales Esparcia <manuel@linuxfromscratch.org>2006-12-04 10:19:31 +0000
committerManuel Canales Esparcia <manuel@linuxfromscratch.org>2006-12-04 10:19:31 +0000
commit94428c3d47e0137635e4ba712887e036ca612c0f (patch)
treebf02f4016a72b0a51357608010bd5cb13953be1d /stylesheets
parent5470c67ce1090bd011b2b99293562370721443f7 (diff)
Simplified wget-list.xsl. We need only upstream URLs in raw format.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7881 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets')
-rw-r--r--stylesheets/wget-list.xsl50
1 files changed, 4 insertions, 46 deletions
diff --git a/stylesheets/wget-list.xsl b/stylesheets/wget-list.xsl
index 823641217..6498ade1a 100644
--- a/stylesheets/wget-list.xsl
+++ b/stylesheets/wget-list.xsl
@@ -1,15 +1,14 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
-<!-- $Id$ -->
+<!-- Create a list of upstream URLs for packages and patches to be used
+ with wget.
+ NOTE: there are several sourceforge URLs that don't work with wget. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
- <!-- The libc model used for HLFS -->
- <xsl:param name="model" select="glibc"/>
-
<xsl:template match="/">
<xsl:apply-templates select="//ulink"/>
</xsl:template>
@@ -18,54 +17,13 @@
<!-- If some package don't have the predefined strings in their
name, the next test must be fixed to match it also. Skip possible
duplicated URLs due that may be splitted for PDF output -->
- <xsl:if test="(ancestor::varlistentry[@condition=$model]
- or not(ancestor::varlistentry[@condition])) and
- (contains(@url, '.tar.') or contains(@url, '.tgz')
+ <xsl:if test="(contains(@url, '.tar.') or contains(@url, '.tgz')
or contains(@url, '.patch')) and
not(ancestor-or-self::*/@condition = 'pdf')">
- <!-- Extract the package name -->
- <xsl:variable name="package">
- <xsl:call-template name="package.name">
- <xsl:with-param name="url" select="@url"/>
- </xsl:call-template>
- </xsl:variable>
- <!-- Extract the directory for that package -->
- <xsl:variable name="cut"
- select="translate(substring-after($package, '-'),
- '0123456789', '0000000000')"/>
- <xsl:variable name="package2">
- <xsl:value-of select="substring-before($package, '-')"/>
- <xsl:text>-</xsl:text>
- <xsl:value-of select="$cut"/>
- </xsl:variable>
- <xsl:variable name="dirname" select="substring-before($package2, '-0')"/>
- <!-- Write the upstream URLs, except the redirected ones -->
<xsl:value-of select="@url"/>
- <xsl:text> </xsl:text>
<xsl:text>&#x0a;</xsl:text>
</xsl:if>
</xsl:template>
- <xsl:template name="package.name">
- <xsl:param name="url"/>
- <xsl:choose>
- <xsl:when test="contains($url, '/')">
- <xsl:call-template name="package.name">
- <xsl:with-param name="url" select="substring-after($url, '/')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="contains($url, '?')">
- <xsl:value-of select="substring-before($url, '?')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$url"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
</xsl:stylesheet>