blob: 93ff3daadaa763213cdd38d5e42ef17bdc31162c [file] [log] [blame]
Stephan Herrmann8bbae122010-06-14 19:12:51 +00001<!--
2Copyright (c) 2010 Mia-Software
3All rights reserved. This program and the accompanying materials
4are made available under the terms of the Eclipse Public License v1.0
5which accompanies this distribution, and is available at
6http://www.eclipse.org/legal/epl-v10.html
7
8Contributors:
9Gregoire Dupe - initial implementation
10Stephan Herrmann - adaptation for Object Teams
11-->
12<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
13 version="1.0">
14 <xsl:output encoding="UTF-8" method="xml" indent="yes" />
15 <xsl:strip-space elements="*" />
16 <xsl:param name="repo" />
17 <xsl:param name="version" />
18
19 <xsl:template match="/">
20 <xsl:processing-instruction name="artifactRepository">version='1.1.0'</xsl:processing-instruction>
21
22 <xsl:apply-templates />
23 </xsl:template>
24
25 <xsl:template match="repository/properties">
26 <properties size='{@size+1}'>
27 <xsl:copy-of select="property" />
28 <property name='p2.statsURI'>
29 <xsl:attribute name="value"><xsl:value-of select="$repo" /></xsl:attribute>
30 </property>
31 </properties>
32 </xsl:template>
33
34 <xsl:template match="artifact[@classifier='osgi.bundle' and @id='org.eclipse.objectteams.runtime']/properties">
35 <xsl:call-template name="artifact_properties"/>
36 </xsl:template>
37
38 <xsl:template match="artifact[@classifier='org.eclipse.update.feature' and @id='org.eclipse.objectteams.otdt']/properties">
39 <xsl:call-template name="artifact_properties"/>
40 </xsl:template>
41
42 <xsl:template match="artifact[@classifier='org.eclipse.update.feature' and @id='org.eclipse.objectteams.otequinox']/properties">
43 <xsl:call-template name="artifact_properties"/>
44 </xsl:template>
45
Stephan Herrmannc1c92fd2017-03-05 20:01:24 +010046 <xsl:template match="artifact[@classifier='org.eclipse.update.feature' and @id='org.eclipse.objectteams.otequinox.otre']/properties">
47 <xsl:call-template name="artifact_properties"/>
48 </xsl:template>
49
Stephan Herrmanna4c93012014-08-30 19:15:58 +020050 <xsl:template match="artifact[@classifier='org.eclipse.update.feature' and @id='org.eclipse.objectteams.otequinox.turbo']/properties">
51 <xsl:call-template name="artifact_properties"/>
52 </xsl:template>
53
Stephan Herrmann8bbae122010-06-14 19:12:51 +000054 <xsl:template name="artifact_properties">
55 <properties size='{@size+1}'>
56 <xsl:copy-of select="property" />
57 <property name='download.stats'>
58 <xsl:attribute name="value">
59 <xsl:copy-of select='string(../@id)'/>.<xsl:value-of select='$version' />
60 </xsl:attribute>
61 </property>
62 </properties>
63 </xsl:template>
64
65 <xsl:template match="*">
66 <xsl:copy>
67 <xsl:for-each select="@*">
68 <xsl:copy-of select="." />
69 </xsl:for-each>
70 <xsl:apply-templates />
71 </xsl:copy>
72 </xsl:template>
73
74</xsl:stylesheet>