source: BLFS/xsl/bump.xsl@ 794f94f

ablfs-more legacy trunk
Last change on this file since 794f94f was fd4a798, checked in by Pierre Labastie <pierre.labastie@…>, 3 years ago

Remove $Id$ comments, they are useless with git

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