forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdupoiri...@apache.org
Subject svn commit: r592403 - /forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-document.xsl
Date Tue, 06 Nov 2007 12:17:07 GMT
Author: cdupoirieux
Date: Tue Nov  6 04:17:07 2007
New Revision: 592403

URL: http://svn.apache.org/viewvc?rev=592403&view=rev
Log:
Changes.rss if general changes, changes_<version>.rss if a version is supplied, changes_current.rss
if current is the asked version.
Before this changes, all changes pages had a link to changes.rss...

Modified:
    forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-document.xsl

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-document.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-document.xsl?rev=592403&r1=592402&r2=592403&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-document.xsl
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-document.xsl
Tue Nov  6 04:17:07 2007
@@ -38,6 +38,17 @@
   <xsl:key name="committers" match="developers/person" use="@id"/>
   <xsl:key name="distinct-committer" match="changes/release/action" use="concat(../@version,
'_', @dev)"/>
   <xsl:key name="distinct-contributor" match="changes/release/action" use="concat(../@version,
'_', @due-to)"/>
+  <!-- versionNumber: detect the value "current" or use the number that was supplied -->
+  <xsl:variable name="realVersionNumber">
+    <xsl:choose>
+      <xsl:when test="$versionNumber='current' or $versionNumber=''">
+        <xsl:value-of select="//release[1]/@version"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$versionNumber"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
   <xsl:template match="/">
     <xsl:apply-templates select="//changes"/>
   </xsl:template>
@@ -57,7 +68,15 @@
       </header>
       <body>
         <p>
-          <link href="changes.rss">
+          <link>
+          <xsl:choose>
+            <xsl:when test="$versionNumber">
+              <xsl:attribute name="href">changes_<xsl:value-of select="$versionNumber"/>.rss</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:attribute name="href">changes.rss</xsl:attribute>
+            </xsl:otherwise>
+          </xsl:choose>
           <img src="{$root}images/rss.png" alt="RSS"/>
           </link>
         </p>



Mime
View raw message