source: common/packages.xsl@ d1ede32

2.3 2.3.x 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since d1ede32 was 139c34e, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

HLFS: Select the proper kernel package for packages list and download.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2
3<!-- $Id$ -->
4
5<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 version="1.0">
7
8 <xsl:output method="text"/>
9
10 <!-- The libc model used for HLFS -->
11 <xsl:param name="model" select="glibc"/>
12
13 <!-- The kernel series used for HLFS -->
14 <xsl:param name="kernel" select="2.6"/>
15
16 <xsl:template match="/">
17 <xsl:apply-templates select="//para"/>
18 </xsl:template>
19
20 <xsl:template match="para">
21 <xsl:if test="contains(string(),'Download:') and
22 (ancestor::varlistentry[@condition=$model]
23 or not(ancestor::varlistentry[@condition])) and
24 (ancestor::varlistentry[@vendor=$kernel]
25 or not(ancestor::varlistentry[@vendor]))">
26 <xsl:call-template name="package_name">
27 <xsl:with-param name="url" select="ulink/@url"/>
28 </xsl:call-template>
29 <xsl:text>&#xA;</xsl:text>
30 </xsl:if>
31 </xsl:template>
32
33 <xsl:template name="package_name">
34 <xsl:param name="url" select="foo"/>
35 <xsl:param name="sub-url" select="substring-after($url,'/')"/>
36 <xsl:choose>
37 <xsl:when test="contains($sub-url,'/')">
38 <xsl:call-template name="package_name">
39 <xsl:with-param name="url" select="$sub-url"/>
40 </xsl:call-template>
41 </xsl:when>
42 <xsl:otherwise>
43 <xsl:choose>
44 <xsl:when test="contains($sub-url,'.patch')"/>
45 <xsl:when test="contains($sub-url,'?')">
46 <xsl:value-of select="substring-before($sub-url,'?')"/>
47 </xsl:when>
48 <xsl:otherwise>
49 <xsl:value-of select="$sub-url"/>
50 </xsl:otherwise>
51 </xsl:choose>
52 </xsl:otherwise>
53 </xsl:choose>
54 </xsl:template>
55
56</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.