blob: 8c804d3b7ebfec09f3941768d74221e38d424299 (
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
|
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:param name="mirrorsURL"/>
<!-- add p2.mirrorsURL and p2.statsURI properties -->
<xsl:template match="repository/properties">
<properties size='{@size+2}'>
<xsl:copy-of select="property"/>
<property name='p2.statsURI' value='http://download.eclipse.org/stats'/>
<xsl:element name="property">
<xsl:attribute name="name">p2.mirrorsURL</xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="$mirrorsURL"/></xsl:attribute>
</xsl:element>
</properties>
</xsl:template>
<!-- add p2.mirrorsURL property -->
<xsl:template match="repository/artifacts/artifact/properties[../@classifier='org.eclipse.update.feature']">
<properties size='{@size+1}'>
<xsl:copy-of select="property"/>
<property name='download.stats' value='{../@id}-{../@version}'/>
</properties>
</xsl:template>
<!-- copy everything else -->
<xsl:template match="* | @*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
|