blob: 3c2b6ebff19ffa4868c3ce0a92f4d8a95f33d2cb [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:element name="installable">
<xsl:attribute name="version">1.0.0</xsl:attribute>
<xsl:element name="units">
<xsl:attribute name="size">
<xsl:value-of select="count(//contributions)"/>
</xsl:attribute>
<xsl:apply-templates select="//contributions"/>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match="contributions">
<xsl:variable name="ui_id_tmp">epp.<xsl:value-of select="@label"/></xsl:variable>
<xsl:variable name="ui_id" select="translate($ui_id_tmp,' ','_')"/>
<xsl:element name="unit">
<xsl:attribute name="version">3.5.0.qualifier</xsl:attribute>
<xsl:attribute name="id"><xsl:value-of select="$ui_id"/></xsl:attribute>
<xsl:element name="properties">
<xsl:attribute name="size">3</xsl:attribute>
<xsl:element name="property">
<xsl:attribute name="name">org.eclipse.equinox.p2.name</xsl:attribute>
<xsl:attribute name="value"/>
</xsl:element>
<xsl:element name="property">
<xsl:attribute name="name">lineUp</xsl:attribute>
<xsl:attribute name="value">true</xsl:attribute>
</xsl:element>
<xsl:element name="property">
<xsl:attribute name="name">org.eclipse.equinox.p2.type.group</xsl:attribute>
<xsl:attribute name="value">true</xsl:attribute>
</xsl:element>
<xsl:element name="property">
<xsl:attribute name="name">org.eclipse.equinox.p2.description</xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="$ui_id"/></xsl:attribute>
</xsl:element>
</xsl:element>
<xsl:element name="provides">
<xsl:attribute name="size">1</xsl:attribute>
<xsl:element name="provided">
<xsl:attribute name="namespace">org.eclipse.equinox.p2.iu</xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="$ui_id"/></xsl:attribute>
<xsl:attribute name="version">3.5.0.qualifier</xsl:attribute>
</xsl:element>
</xsl:element>
<xsl:element name="requires">
<xsl:for-each select="features">
<xsl:element name="required">
<xsl:attribute name="namespace">org.eclipse.equinox.p2.iu</xsl:attribute>
<xsl:attribute name="range">0.0.0</xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="@id"/>.feature.group</xsl:attribute>
</xsl:element>
</xsl:for-each>
<xsl:element name="required">
<xsl:attribute name="namespace">org.eclipse.equinox.p2.iu</xsl:attribute>
<xsl:attribute name="range">0.0.0</xsl:attribute>
<xsl:attribute name="name">org.eclipse.epp.usagedata.feature.feature.group</xsl:attribute>
</xsl:element>
<xsl:element name="required">
<xsl:attribute name="namespace">org.eclipse.equinox.p2.iu</xsl:attribute>
<xsl:attribute name="range">0.0.0</xsl:attribute>
<xsl:attribute name="name">org.eclipse.platform.ide</xsl:attribute>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>