]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- avoid processing wrong xml files (xml must start with <feature>)
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 12 Nov 2010 12:02:44 +0000 (12:02 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    eclipse-feature.xslt -> 1.4

eclipse-feature.xslt

index 280bdcd883d50792476b1cf8e4fc9aa98a8c79ec..dc0f9850881eef8a085e27f8861abb1355dc155e 100644 (file)
@@ -4,18 +4,22 @@
 
 <!-- we match from root, not to left anything to default template -->
 <xsl:template match="/">
+       <xsl:apply-templates select="feature"/>
+</xsl:template>
+
+<xsl:template match="feature">
        <!-- process provides -->
        <xsl:if test="$mode = 'provides'">
                <xsl:text>eclipse(</xsl:text>
-                       <xsl:value-of select="//feature/@id"/>
+                       <xsl:value-of select="@id"/>
                        <xsl:text>) = </xsl:text>
-                       <xsl:value-of select="//feature/@version"/>
+                       <xsl:value-of select="@version"/>
                <xsl:text>&#10;</xsl:text>
        </xsl:if>
 
        <!-- process requires -->
        <xsl:if test="$mode = 'requires'">
-               <xsl:for-each select="feature/requires/import">
+               <xsl:for-each select="requires/import">
                        <xsl:text>eclipse(</xsl:text>
                                <xsl:value-of select="@plugin"/>
                        <xsl:text>)</xsl:text>
This page took 0.04355 seconds and 4 git commands to generate.