Stephan Herrmann | 8bbae12 | 2010-06-14 19:12:51 +0000 | [diff] [blame] | 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 | --> |
| 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 Herrmann | c1c92fd | 2017-03-05 20:01:24 +0100 | [diff] [blame] | 46 | <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 Herrmann | a4c9301 | 2014-08-30 19:15:58 +0200 | [diff] [blame] | 50 | <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 Herrmann | 8bbae12 | 2010-06-14 19:12:51 +0000 | [diff] [blame] | 54 | <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> |