forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r348707 - in /forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo: resources.xmap resources/stylesheets/changes-to-rss.xsl status.xml
Date Thu, 24 Nov 2005 11:08:23 GMT
Author: rgardler
Date: Thu Nov 24 03:08:13 2005
New Revision: 348707

URL: http://svn.apache.org/viewcvs?rev=348707&view=rev
Log:
remove todo items from changes RSS feed. Enable filtering of RSS feed by version.

Modified:
    forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources.xmap
    forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-rss.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/status.xml

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources.xmap?rev=348707&r1=348706&r2=348707&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources.xmap (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources.xmap Thu Nov
24 03:08:13 2005
@@ -37,6 +37,17 @@
         <map:transform src="{lm:projectInfo.transform.changes.rss}"/>
         <map:serialize type="rss091" />
       </map:match>
+    
+      <map:match type="regexp" pattern="^(.*?)([^/]*)changes_(.*).rss$">
+        <map:aggregate element="agg">
+          <map:part src="cocoon://skinconf.xml"/>
+          <map:part src="{lm:project.status}"/>
+        </map:aggregate>
+        <map:transform src="{lm:projectInfo.transform.changes.rss}">
+          <map:parameter name="versionNumber" value="{3}"/>
+        </map:transform>
+        <map:serialize type="rss091" />
+      </map:match>
 
     </map:pipeline>
   </map:pipelines>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-rss.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-rss.xsl?rev=348707&r1=348706&r2=348707&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-rss.xsl
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-rss.xsl
Thu Nov 24 03:08:13 2005
@@ -17,55 +17,101 @@
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
-  <xsl:template match="status">
+  <xsl:param name="versionNumber"/>
 
-    <xsl:variable name="changes-url"
-      select="concat(../skinconfig/project-url, 'changes.html')"/>
+  <xsl:variable name="changes-url"
+    select="concat(../skinconfig/project-url, 'changes.html')"/>
 
+  <xsl:template match="status">
+      
     <rss version="0.91">
       <channel>
-        <title><xsl:value-of select="../skinconfig/project-name"/> Changes</title>
+        <xsl:choose>
+          <xsl:when test="$versionNumber = 'current'">
+            <title><xsl:value-of select="../skinconfig/project-name"/> (<xsl:value-of
select="//release[1]/@version"/>) Changes</title>
+          </xsl:when>
+          <xsl:when test="$versionNumber">
+            <title><xsl:value-of select="../skinconfig/project-name"/> (<xsl:value-of
select="$versionNumber"/>) Changes</title>
+          </xsl:when>
+          <xsl:otherwise>
+            <title><xsl:value-of select="../skinconfig/project-name"/> (<xsl:value-of
select="//release[1]/@version"/>) Changes</title>
+          </xsl:otherwise>
+        </xsl:choose>
 
         <link><xsl:value-of select="$changes-url"/></link>
 
-        <description><xsl:value-of select="../skinconfig/project-name"/> Changes</description>
+        
+        <xsl:choose>
+          <xsl:when test="$versionNumber = 'current'">
+            <description><xsl:value-of select="../skinconfig/project-name"/>
(<xsl:value-of select="//release[1]/@version"/>) Changes</description>
+          </xsl:when>
+          <xsl:when test="$versionNumber">
+            <description><xsl:value-of select="../skinconfig/project-name"/>
(<xsl:value-of select="$versionNumber"/>) Changes</description>
+          </xsl:when>
+          <xsl:otherwise>
+            <description><xsl:value-of select="../skinconfig/project-name"/>
(<xsl:value-of select="//release[1]/@version"/>) Changes</description>
+          </xsl:otherwise>
+        </xsl:choose>
 
         <language>en-us</language>
 
-        <xsl:for-each select="changes/release[1]/action">
-          <item>
-            <title>
-              <xsl:value-of select="@context" />
-              <xsl:text> </xsl:text>
-              <xsl:value-of select="@type" />
-
-              <xsl:if test="@fixes-bug">
-                (bug <xsl:value-of select="@fixes-bug" />)
-              </xsl:if>
-
-            </title>
-
-            <link><xsl:value-of select="$changes-url"/></link>
-
-            <description>
-              <xsl:value-of select="@context" />
-              <xsl:text> </xsl:text>
-              <xsl:value-of select="@type" />
-              by
-              <xsl:value-of select="@dev" />
-              <xsl:if test="@fixes-bug">
-                (fixes bug <xsl:value-of select="@fixes-bug" />)
-              </xsl:if>
-              :
-              <xsl:value-of select="." />
-              <xsl:if test="@due-to"> Thanks to <xsl:value-of select="@due-to" />.</xsl:if>
-            </description>
-          </item>
-        </xsl:for-each>
+        <xsl:choose>
+          <xsl:when test="$versionNumber">
+            <xsl:choose>
+              <xsl:when test="$versionNumber='current'">
+                <xsl:apply-templates select="//release[1]"/>
+              </xsl:when>
+              <xsl:when test="$versionNumber">
+                <xsl:apply-templates select="//release[@version=$versionNumber]"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:apply-templates select="//release[1]"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates/>
+          </xsl:otherwise>
+        </xsl:choose>
+    
+        <xsl:apply-templates select="changes/release[1]/action"/>
       </channel>
     </rss>
   </xsl:template>
+  
+  <xsl:template match="action">
+    <item>
+      <title>
+        <xsl:value-of select="@context" />
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="@type" />
+
+        <xsl:if test="@fixes-bug">
+          (bug <xsl:value-of select="@fixes-bug" />)
+        </xsl:if>
+
+      </title>
+
+      <link><xsl:value-of select="$changes-url"/></link>
+
+      <description>
+        <xsl:value-of select="@context" />
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="@type" />
+        by
+        <xsl:value-of select="@dev" />
+        <xsl:if test="@fixes-bug">
+          (fixes bug <xsl:value-of select="@fixes-bug" />)
+        </xsl:if>
+        :
+        <xsl:value-of select="." />
+        <xsl:if test="@due-to"> Thanks to <xsl:value-of select="@due-to" />.</xsl:if>
+      </description>
+    </item>
+  </xsl:template>
 
   <xsl:template match="skinconfig"/>
+  <xsl:template match="notes"/>
+  <xsl:template match="todo"/>
 </xsl:stylesheet>
 

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/status.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/status.xml?rev=348707&r1=348706&r2=348707&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/status.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/status.xml Thu Nov 24
03:08:13 2005
@@ -43,8 +43,14 @@
     <release version="0.2-dev" date="unreleased">
       <notes>
         <p>This plugin provides various mechanisms for extracting and
-        displaying information about a given project.</p>
+        displaying information about one or more projects.</p>
       </notes>
+      <action dev="RDG" type="add" context="code">
+        Added RSS changes feeds for individual versions.
+      </action>
+      <action dev="RDG" type="add" context="code">
+        Removed todo items from changes RSS feed.
+      </action>
       <action dev="RDG" type="add" context="code">
         Add configuration options to control sorting of changes and
         inclusion of developer and committer lists.



Mime
View raw message