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
RevLine 
[a160d86]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
[c9598f2]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'"/>
[7072e1f]13
[a160d86]14 <xsl:template match="/">
[7b33f40]15 <xsl:apply-templates
[978286a]16 select="//varlistentry[(@revision=$revision or not(@revision)) and
[7b33f40]17 //para[contains(string(),'Download:')]"/>
[7072e1f]18 <xsl:if test="$pkgmngt='y'">
19 <xsl:apply-templates
20 select="document('packageManager.xml')//sect1[@id='package']//para"/>
21 </xsl:if>
[a160d86]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">
[7b33f40]31 <xsl:param name="url" select="'foo'"/>
[7072e1f]32 <xsl:variable name="sub-url" select="substring-after($url,'/')"/>
[a160d86]33 <xsl:choose>
[ff9938f]34 <xsl:when test="contains($sub-url,'/') and
35 not(substring-after($sub-url,'/')='')">
[a160d86]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,'?')"/>
[7072e1f]45 <xsl:text>&#xA;</xsl:text>
[a160d86]46 </xsl:when>
[ff9938f]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>
[a160d86]51 <xsl:otherwise>
52 <xsl:value-of select="$sub-url"/>
[7072e1f]53 <xsl:text>&#xA;</xsl:text>
[a160d86]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.