You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2005/04/27 21:33:06 UTC

svn commit: r165031 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.include.xsl

Author: thorsten
Date: Wed Apr 27 12:33:05 2005
New Revision: 165031

URL: http://svn.apache.org/viewcvs?rev=165031&view=rev
Log:
Fixed a bug regarding duplicate includes of contracts in the view

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.include.xsl

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.include.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.include.xsl?rev=165031&r1=165030&r2=165031&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.include.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.include.xsl Wed Apr 27 12:33:05 2005
@@ -25,12 +25,15 @@
          stylesheet-prefix="alias" result-prefix="xsl"/>
 
 	<xsl:param name="format"/>
-
+  <xsl:key name="contract-name" match="forrest:contract" use="@name" />
+  
   <xsl:template match="/">
     <alias:stylesheet version="1.0">
-	    <xsl:for-each select="forrest:views/forrest:view[@type=$format]//forrest:contract">
-	      <xi:include href="cocoon://get.contract.{$format}.{@name}"/>
-	    </xsl:for-each>
+      <xsl:for-each 
+        select="forrest:views/forrest:view[@type=$format]//forrest:contract[count(. | key('contract-name', @name)[1]) = 1]">
+        <xsl:sort select="@name" />
+        <xi:include href="cocoon://get.contract.{$format}.{@name}"/>
+      </xsl:for-each>
     </alias:stylesheet>
   </xsl:template>