3271e0c45da1dab399c147fb568f4bdd18e52f76
[deliverable/titan.core.git] / etc / download_stats / addDownloadStats.xsl
1 <!--
2 Copyright (c) 2010 Mia-Software
3 All rights reserved. This program and the accompanying materials
4 are made available under the terms of the Eclipse Public License v1.0
5 which accompanies this distribution, and is available at
6 http://www.eclipse.org/legal/epl-v10.html
7
8 Contributors:
9 Gregoire Dupe - initial implementation
10 Stephan Herrmann - adaptation for Object Teams
11 Ferenc Kovacs - adaptation for Titan, Ericsson AB
12 -->
13 <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version="1.0">
14 <xsl:output encoding="UTF-8" method="xml" indent="yes" />
15 <xsl:strip-space elements="*" />
16 <!-- Not used. -->
17 <xsl:param name="repo" value="http://ttcn.ericsson.se/download/eclipse_stats" />
18
19 <xsl:template match="/">
20 <xsl:processing-instruction name="artifactRepository">version='1.1.0'</xsl:processing-instruction>
21 <xsl:apply-templates />
22 </xsl:template>
23
24 <xsl:template match="repository/properties">
25 <properties size='{@size+1}'>
26 <xsl:copy-of select="property" />
27 <property name='p2.statsURI'>
28 <xsl:attribute name="value">http://ttcn.ericsson.se/download/eclipse_stats</xsl:attribute>
29 </property>
30 </properties>
31 </xsl:template>
32
33 <xsl:template match="artifact[@classifier='org.eclipse.update.feature' and @id='TITAN_Designer']/properties">
34 <xsl:call-template name="artifact_properties" />
35 </xsl:template>
36
37 <xsl:template match="artifact[@classifier='org.eclipse.update.feature' and @id='TITAN_Executor']/properties">
38 <xsl:call-template name="artifact_properties" />
39 </xsl:template>
40
41 <xsl:template match="artifact[@classifier='org.eclipse.update.feature' and @id='TITAN_Log_Viewer']/properties">
42 <xsl:call-template name="artifact_properties" />
43 </xsl:template>
44
45 <xsl:template name="artifact_properties">
46 <properties size='{@size+1}'>
47 <xsl:copy-of select="property" />
48 <property name='download.stats'>
49 <xsl:attribute name="value"><xsl:copy-of select='string(../@id)' />.<xsl:value-of select='substring-before(../@version, "CRL")' />eclipsestats.php</xsl:attribute>
50 </property>
51 </properties>
52 </xsl:template>
53
54 <xsl:template match="*">
55 <xsl:copy>
56 <xsl:for-each select="@*"><xsl:copy-of select="." /></xsl:for-each>
57 <xsl:apply-templates />
58 </xsl:copy>
59 </xsl:template>
60
61 </xsl:stylesheet>
This page took 0.031808 seconds and 4 git commands to generate.