]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- print out rpm requires/provides from eclipse feature.xml
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 12 Nov 2010 09:22:27 +0000 (09:22 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    eclipse-feature.xslt -> 1.1

eclipse-feature.xslt [new file with mode: 0644]

diff --git a/eclipse-feature.xslt b/eclipse-feature.xslt
new file mode 100644 (file)
index 0000000..a7705fc
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text"/>
+
+<!-- we match from root, not to left anything to default template -->
+<xsl:template match="/">
+       <!-- process provides -->
+       <xsl:text>Provides:&#09;eclipse(</xsl:text>
+               <xsl:value-of select="//feature/@id"/>
+               <xsl:text>) = </xsl:text>
+               <xsl:value-of select="//feature/@version"/>
+       <xsl:text>&#10;</xsl:text>
+
+       <!-- process requires -->
+       <xsl:for-each select="feature/requires/import">
+               <xsl:text>Requires:&#09;eclipse(</xsl:text>
+                       <xsl:value-of select="@plugin"/>
+               <xsl:text>)</xsl:text>
+
+               <!-- handle match="perfect" (probably means: same version as us) -->
+                       <xsl:if test="@match = 'perfect'">
+                               <xsl:text> = </xsl:text>
+                               <xsl:value-of select="//feature/@version"/>
+                       </xsl:if>
+
+               <xsl:text>&#10;</xsl:text>
+       </xsl:for-each>
+</xsl:template>
+
+</xsl:stylesheet>
This page took 0.035878 seconds and 4 git commands to generate.