source: BLFS/xsl/bump.xsl@ 2ce3688

2.4 ablfs-more legacy new_features trunk
Last change on this file since 2ce3688 was e576789, checked in by Pierre Labastie <pierre@…>, 11 years ago

Merge ablfs branch. Normally, jhalfs should not perform differently
for building LFS

  • Property mode set to 100644
File size: 1.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2
3<!-- $Id: bump.xsl 21 2012-02-16 15:06:19Z labastie $ -->
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.