packages: rpm/eclipse-feature.xslt (NEW) - print out rpm requires/provides ...

glen glen at pld-linux.org
Fri Nov 12 10:22:32 CET 2010


Author: glen                         Date: Fri Nov 12 09:22:32 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- print out rpm requires/provides from eclipse feature.xml

---- Files affected:
packages/rpm:
   eclipse-feature.xslt (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/rpm/eclipse-feature.xslt
diff -u /dev/null packages/rpm/eclipse-feature.xslt:1.1
--- /dev/null	Fri Nov 12 10:22:33 2010
+++ packages/rpm/eclipse-feature.xslt	Fri Nov 12 10:22:27 2010
@@ -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>
================================================================


More information about the pld-cvs-commit mailing list