Skip to main content
summaryrefslogtreecommitdiffstats
blob: 5d47f301b93f8b79d76161eedcb1222f605f1048 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:output indent="yes"/>

    <xsl:param name="version"/>
    <xsl:param name="date"/>

    <xsl:template match="/site">
        <site>
	    <xsl:copy-of select="*|@*"/>
	    <category-def>
		<xsl:attribute name="name">
		    <xsl:text>CDT Build </xsl:text>
		    <xsl:value-of select="$version"/>
		</xsl:attribute>
		<xsl:attribute name="label">
		    <xsl:text>CDT Build </xsl:text>
		    <xsl:value-of select="$version"/>
		    <xsl:text> - </xsl:text>
		    <xsl:value-of select="$date"/>
		</xsl:attribute>
	    </category-def>
	    <xsl:apply-templates mode="features" select="document('manifest.xml')"/>
	</site>
    </xsl:template>

    <xsl:template mode="features" match="/projects/feature[not(@visible='false')]">
        <feature>
	    <xsl:attribute name="url">
	        <xsl:text>features/</xsl:text>
		<xsl:value-of select="@name"/>
		<xsl:text>_</xsl:text>
		<xsl:value-of select="$version"/>
		<xsl:text>.jar</xsl:text>
	    </xsl:attribute>
	    <xsl:attribute name="id">
	        <xsl:value-of select="@name"/>
	    </xsl:attribute>
	    <xsl:attribute name="version">
	        <xsl:value-of select="$version"/>
	    </xsl:attribute>
	    <category>
	        <xsl:attribute name="name">
		    <xsl:text>CDT Build </xsl:text>
		    <xsl:value-of select="$version"/>
		</xsl:attribute>
	    </category>
	</feature>
    </xsl:template>

    <xsl:template mode="features" match="/projects">
        <xsl:apply-templates mode="features" select="*"/>
    </xsl:template>

</xsl:transform>

Back to the top