source: common/packages.xsl@ 83cfe91

trunk
Last change on this file since 83cfe91 was 978286a, checked in by Pierre Labastie <pierre.labastie@…>, 3 years ago

Remove legacy: remove everything about HLFS

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