servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r654114 - /servicemix/smx3/branches/servicemix-3.2/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl
Date Wed, 07 May 2008 14:12:56 GMT
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()">



Mime
View raw message