source: common/packages.xsl@ c0cf6c8

experimental
Last change on this file since c0cf6c8 was 3b63c8c, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Updated experimental branch to current trunk code.

  • Property mode set to 100644
File size: 1.3 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 <xsl:template match="/">
11 <xsl:apply-templates select="//para"/>
12 </xsl:template>
13
14 <xsl:template match="para">
15 <xsl:if test="contains(string(),'Download:')">
16 <xsl:call-template name="package_name">
17 <xsl:with-param name="url" select="ulink/@url"/>
18 </xsl:call-template>
19 <xsl:text>&#xA;</xsl:text>
20 </xsl:if>
21 </xsl:template>
22
23 <xsl:template name="package_name">
24 <xsl:param name="url" select="foo"/>
25 <xsl:param name="sub-url" select="substring-after($url,'/')"/>
26 <xsl:choose>
27 <xsl:when test="contains($sub-url,'/')">
28 <xsl:call-template name="package_name">
29 <xsl:with-param name="url" select="$sub-url"/>
30 </xsl:call-template>
31 </xsl:when>
32 <xsl:otherwise>
33 <xsl:choose>
34 <xsl:when test="contains($sub-url,'.patch')"/>
35 <xsl:when test="contains($sub-url,'?')">
36 <xsl:value-of select="substring-before($sub-url,'?')"/>
37 </xsl:when>
38 <xsl:otherwise>
39 <xsl:value-of select="$sub-url"/>
40 </xsl:otherwise>
41 </xsl:choose>
42 </xsl:otherwise>
43 </xsl:choose>
44 </xsl:template>
45
46</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.