forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r165031 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.include.xsl
Date Wed, 27 Apr 2005 19:33:06 GMT
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>
 



Mime
View raw message