]> git.pld-linux.org Git - packages/rpm.git/blob - eclipse-feature.xslt
- take $mode (provides | requires)
[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         <!-- process provides -->
8         <xsl:if test="$mode = 'provides'">
9         <xsl:text>eclipse(</xsl:text>
10                 <xsl:value-of select="//feature/@id"/>
11                 <xsl:text>) = </xsl:text>
12                 <xsl:value-of select="//feature/@version"/>
13         <xsl:text>&#10;</xsl:text>
14         </xsl:if>
15
16         <!-- process requires -->
17         <xsl:if test="$mode = 'requires'">
18         <xsl:for-each select="feature/requires/import">
19                 <xsl:text>eclipse(</xsl:text>
20                         <xsl:value-of select="@plugin"/>
21                 <xsl:text>)</xsl:text>
22
23                 <!-- handle match="perfect" (probably means: same version as us) -->
24                         <xsl:if test="@match = 'perfect'">
25                                 <xsl:text> = </xsl:text>
26                                 <xsl:value-of select="//feature/@version"/>
27                         </xsl:if>
28
29                 <xsl:text>&#10;</xsl:text>
30         </xsl:for-each>
31         </xsl:if>
32
33 </xsl:template>
34
35 </xsl:stylesheet>
This page took 0.030899 seconds and 4 git commands to generate.