blob: c2ae269295f9d9f4a96368c7c59f74140fe1fccc [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
46 <xsl:template name="artifact_properties">
47 <properties size='{@size+1}'>
48 <xsl:copy-of select="property" />
49 <property name='download.stats'>
50 <xsl:attribute name="value">
51 <xsl:copy-of select='string(../@id)'/>.<xsl:value-of select='$version' />
52 </xsl:attribute>
53 </property>
54 </properties>
55 </xsl:template>
56
57 <xsl:template match="*">
58 <xsl:copy>
59 <xsl:for-each select="@*">
60 <xsl:copy-of select="." />
61 </xsl:for-each>
62 <xsl:apply-templates />
63 </xsl:copy>
64 </xsl:template>
65
66</xsl:stylesheet>