source: BLFS/xsl/bump.xsl@ 6f74ca1

ablfs-more legacy trunk
Last change on this file since 6f74ca1 was 56178ba, checked in by Pierre Labastie <pierre@…>, 8 years ago

Add a few forgotten keywords properties

  • Property mode set to 100644
File size: 1.5 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:param name="packages" select="'packages.xml'"/>
9 <xsl:param name="package" select="''"/>
10 <xsl:param name="version" select="'N'"/>
11
12 <xsl:variable name="vers">
13 <xsl:choose>
14 <xsl:when test="$version='N'">
15 <xsl:value-of select=
16 "document($packages)//*[self::package or self::module]
17 [string(name)=$package]/version"/>
18 </xsl:when>
19 <xsl:otherwise>
20 <xsl:value-of select="$version"/>
21 </xsl:otherwise>
22 </xsl:choose>
23 </xsl:variable>
24
25 <xsl:output
26 method="xml"
27 encoding="ISO-8859-1"
28 doctype-system="PACKDESC"/>
29
30 <xsl:template match="/">
31 <sublist>
32 <xsl:copy-of select="./sublist/name"/>
33 <xsl:apply-templates select=".//package"/>
34 <xsl:if test="not(.//package[string(name)=$package])">
35 <package>
36 <name><xsl:value-of select="$package"/></name>
37 <version><xsl:value-of select="$vers"/></version>
38 </package>
39 </xsl:if>
40 </sublist>
41 </xsl:template>
42
43 <xsl:template match="package">
44 <xsl:choose>
45 <xsl:when test="string(name)=$package">
46 <package>
47 <name><xsl:value-of select="name"/></name>
48 <version><xsl:value-of select="$vers"/></version>
49 </package>
50 </xsl:when>
51 <xsl:otherwise>
52 <xsl:copy-of select='.'/>
53 </xsl:otherwise>
54 </xsl:choose>
55 </xsl:template>
56
57</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.