2006-06-20 23:14:44 +02:00
|
|
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
|
|
|
|
|
|
|
<!-- $Id$ -->
|
|
|
|
|
|
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
version="1.0">
|
|
|
|
|
|
|
|
<xsl:output method="text"/>
|
|
|
|
|
2007-06-03 12:54:07 +02:00
|
|
|
<!-- The libc model used for HLFS -->
|
2016-06-19 16:41:18 +02:00
|
|
|
<xsl:param name="model" select="'glibc'"/>
|
2007-06-03 12:54:07 +02:00
|
|
|
|
|
|
|
<!-- The kernel series used for HLFS -->
|
2016-06-19 16:41:18 +02:00
|
|
|
<xsl:param name="kernel" select="'2.6'"/>
|
2007-06-03 12:54:07 +02:00
|
|
|
|
2016-06-19 16:41:18 +02:00
|
|
|
<!-- Should we include a package manager? -->
|
|
|
|
<xsl:param name="pkgmngt" select="'n'"/>
|
|
|
|
|
|
|
|
<!-- The system for LFS: sysv of systemd -->
|
|
|
|
<xsl:param name="revision" select="'sysv'"/>
|
2012-02-02 00:29:37 +01:00
|
|
|
|
2006-06-20 23:14:44 +02:00
|
|
|
<xsl:template match="/">
|
|
|
|
<xsl:apply-templates select="//para"/>
|
2012-02-02 00:29:37 +01:00
|
|
|
<xsl:if test="$pkgmngt='y'">
|
|
|
|
<xsl:apply-templates
|
|
|
|
select="document('packageManager.xml')//sect1[@id='package']//para"/>
|
|
|
|
</xsl:if>
|
2006-06-20 23:14:44 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="para">
|
2007-06-03 12:54:07 +02:00
|
|
|
<xsl:if test="contains(string(),'Download:') and
|
|
|
|
(ancestor::varlistentry[@condition=$model]
|
|
|
|
or not(ancestor::varlistentry[@condition])) and
|
2016-06-19 16:41:18 +02:00
|
|
|
(ancestor::varlistentry[@revision=$revision]
|
|
|
|
or not(ancestor::varlistentry[@revision])) and
|
2007-06-03 12:54:07 +02:00
|
|
|
(ancestor::varlistentry[@vendor=$kernel]
|
|
|
|
or not(ancestor::varlistentry[@vendor]))">
|
2006-06-20 23:14:44 +02:00
|
|
|
<xsl:call-template name="package_name">
|
|
|
|
<xsl:with-param name="url" select="ulink/@url"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template name="package_name">
|
|
|
|
<xsl:param name="url" select="foo"/>
|
2012-02-02 00:29:37 +01:00
|
|
|
<xsl:variable name="sub-url" select="substring-after($url,'/')"/>
|
2006-06-20 23:14:44 +02:00
|
|
|
<xsl:choose>
|
2014-05-08 22:58:12 +02:00
|
|
|
<xsl:when test="contains($sub-url,'/') and
|
|
|
|
not(substring-after($sub-url,'/')='')">
|
2006-06-20 23:14:44 +02:00
|
|
|
<xsl:call-template name="package_name">
|
|
|
|
<xsl:with-param name="url" select="$sub-url"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="contains($sub-url,'.patch')"/>
|
|
|
|
<xsl:when test="contains($sub-url,'?')">
|
|
|
|
<xsl:value-of select="substring-before($sub-url,'?')"/>
|
2012-02-02 00:29:37 +01:00
|
|
|
<xsl:text>
</xsl:text>
|
2006-06-20 23:14:44 +02:00
|
|
|
</xsl:when>
|
2014-05-08 22:58:12 +02:00
|
|
|
<xsl:when test="contains($sub-url,'/')">
|
|
|
|
<xsl:value-of select="substring-before($sub-url,'/')"/>
|
|
|
|
<xsl:text>
</xsl:text>
|
|
|
|
</xsl:when>
|
2006-06-20 23:14:44 +02:00
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="$sub-url"/>
|
2012-02-02 00:29:37 +01:00
|
|
|
<xsl:text>
</xsl:text>
|
2006-06-20 23:14:44 +02:00
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|