You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2008/05/07 16:12:56 UTC

svn commit: r654114 - /servicemix/smx3/branches/servicemix-3.2/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl

Author: gertv
Date: Wed May  7 07:12:54 2008
New Revision: 654114

URL: http://svn.apache.org/viewvc?rev=654114&view=rev
Log:
SM-1277: Avoiding duplicate entries in archetype catalog

Modified:
    servicemix/smx3/branches/servicemix-3.2/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl

Modified: servicemix/smx3/branches/servicemix-3.2/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl?rev=654114&r1=654113&r2=654114&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl (original)
+++ servicemix/smx3/branches/servicemix-3.2/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl Wed May  7 07:12:54 2008
@@ -20,10 +20,20 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version="1.0">
 
+  <xsl:strip-space elements="*"/>
   <xsl:param name="version"/>
 
-  <xsl:template match="archetype[version != '@{servicemix-version}']">
+  <xsl:template match="archetype[version != '@{servicemix-version}'] | archetype[artifactId = preceding-sibling::archetype/artifactId]">
     <!-- simply drop archetypes for other versions of ServiceMix -->
+    <!-- and also drop any duplicate archetype definitions (e.g. with snapshot builds) -->
+  </xsl:template>
+
+  <xsl:template match="archetypes">
+     <archetypes>
+       <xsl:apply-templates select="archetype">
+         <xsl:sort select="artifactId"/>
+       </xsl:apply-templates>
+     </archetypes>
   </xsl:template>
 
   <xsl:template match="@*|node()">