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-05-28 12:00:30 +02:00
|
|
|
<xsl:param name="model" select="'glibc'"/>
|
2007-06-03 12:54:07 +02:00
|
|
|
|
|
|
|
<!-- The kernel series used for HLFS -->
|
2016-05-28 12:00:30 +02:00
|
|
|
<xsl:param name="kernel" select="'2.6'"/>
|
2007-06-03 12:54:07 +02:00
|
|
|
|
2016-05-28 12:00:30 +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="/">
|
2020-06-20 18:53:31 +02:00
|
|
|
<xsl:apply-templates
|
|
|
|
select="//varlistentry[(@condition=$model or not(@condition)) and
|
|
|
|
(@revision=$revision or not(@revision)) and
|
|
|
|
(@vendor=$kernel or not(@vendor))]
|
|
|
|
//para[contains(string(),'Download:')]"/>
|
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">
|
|
|
|
<xsl:call-template name="package_name">
|
|
|
|
<xsl:with-param name="url" select="ulink/@url"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template name="package_name">
|
2020-06-20 18:53:31 +02:00
|
|
|
<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>
|