]> git.pld-linux.org Git - packages/rpm.git/blob - eclipse-feature.xslt
- avoid processing wrong xml files (xml must start with <feature>)
[packages/rpm.git] / eclipse-feature.xslt
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3 <xsl:output method="text"/>
4
5 <!-- we match from root, not to left anything to default template -->
6 <xsl:template match="/">
7         <xsl:apply-templates select="feature"/>
8 </xsl:template>
9
10 <xsl:template match="feature">
11         <!-- process provides -->
12         <xsl:if test="$mode = 'provides'">
13                 <xsl:text>eclipse(</xsl:text>
14                         <xsl:value-of select="@id"/>
15                         <xsl:text>) = </xsl:text>
16                         <xsl:value-of select="@version"/>
17                 <xsl:text>&#10;</xsl:text>
18         </xsl:if>
19
20         <!-- process requires -->
21         <xsl:if test="$mode = 'requires'">
22                 <xsl:for-each select="requires/import">
23                         <xsl:text>eclipse(</xsl:text>
24                                 <xsl:value-of select="@plugin"/>
25                         <xsl:text>)</xsl:text>
26
27                         <!-- handle match="perfect" (probably means: same version as us) -->
28                                 <xsl:if test="@match = 'perfect'">
29                                         <xsl:text> = </xsl:text>
30                                         <xsl:value-of select="//feature/@version"/>
31                                 </xsl:if>
32
33                         <xsl:text>&#10;</xsl:text>
34                 </xsl:for-each>
35         </xsl:if>
36
37 </xsl:template>
38
39 </xsl:stylesheet>
This page took 0.032828 seconds and 4 git commands to generate.