ablfs
Last change
on this file since d120fec was 4fdb8bd, checked in by Pierre Labastie <pierre@…>, 13 years ago |
suppress a useless template in bump.xsl
|
-
Property mode
set to
100644
|
File size:
1.3 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 |
|
---|
11 | <xsl:output
|
---|
12 | method="xml"
|
---|
13 | encoding="ISO-8859-1"
|
---|
14 | doctype-system="PACKDESC"/>
|
---|
15 |
|
---|
16 | <xsl:template match="/">
|
---|
17 | <sublist>
|
---|
18 | <xsl:copy-of select="./sublist/name"/>
|
---|
19 | <xsl:apply-templates select=".//package"/>
|
---|
20 | <xsl:if test="not(.//package[string(name)=$package])">
|
---|
21 | <package>
|
---|
22 | <name><xsl:value-of select="$package"/></name>
|
---|
23 | <version><xsl:value-of select=
|
---|
24 | "document($packages)//package[string(name)=$package]/version"/>
|
---|
25 | </version>
|
---|
26 | </package>
|
---|
27 | </xsl:if>
|
---|
28 | </sublist>
|
---|
29 | </xsl:template>
|
---|
30 |
|
---|
31 | <xsl:template match="package">
|
---|
32 | <xsl:choose>
|
---|
33 | <xsl:when test="string(name)=$package">
|
---|
34 | <package>
|
---|
35 | <name><xsl:value-of select="name"/></name>
|
---|
36 | <version><xsl:value-of select=
|
---|
37 | "document($packages)//package[string(name)=$package]/version"/>
|
---|
38 | </version>
|
---|
39 | </package>
|
---|
40 | </xsl:when>
|
---|
41 | <xsl:otherwise>
|
---|
42 | <xsl:copy-of select='.'/>
|
---|
43 | </xsl:otherwise>
|
---|
44 | </xsl:choose>
|
---|
45 | </xsl:template>
|
---|
46 |
|
---|
47 | </xsl:stylesheet>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.