<?xml version="1.0"?>
<!--
  This transformation outputs a file list of plugins for RPM
  based on a feature.xml file contents and the specified os/ws/arch triplet
-->
<xsl:transform version="1.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="text" />

<xsl:param name="eclipse-home" />
<xsl:param name="os" />
<xsl:param name="ws" />
<xsl:param name="arch" />

<xsl:template match="/feature">
<xsl:value-of select="$eclipse-home" />/features/<xsl:value-of
	select="@id" />_<xsl:value-of select="@version" /><xsl:text>
</xsl:text><xsl:apply-templates />
</xsl:template>

<xsl:template match="/feature/plugin[not(@os) or @os = $os]
                                    [not(@ws) or @ws = $ws]
                                    [not(@arch) or @arch = $arch]">
<xsl:value-of select="$eclipse-home" />/plugins/<xsl:value-of
	select="@id" />_<xsl:value-of select="@version" />*
</xsl:template>

<xsl:template match="node()" />

</xsl:transform>
