You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2005/10/23 17:05:57 UTC

svn commit: r327799 - in /forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo: input.xmap resources/stylesheets/descriptorIndex-to-indexByLanguage.xsl resources/stylesheets/descriptorIndex-to-langIndex.xsl status.xml

Author: rgardler
Date: Sun Oct 23 08:05:48 2005
New Revision: 327799

URL: http://svn.apache.org/viewcvs?rev=327799&view=rev
Log:
add a page that lists all projects using a given language

Removed:
    forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-langIndex.xsl
Modified:
    forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap
    forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByLanguage.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/status.xml

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap?rev=327799&r1=327798&r2=327799&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap Sun Oct 23 08:05:48 2005
@@ -129,7 +129,7 @@
       <!-- Create an HTML page listing all projects using the indicated language -->
       <map:match pattern="projectDetails/*-lang.xml">
         <map:generate type="file" src="cocoon:/projectDetails/descriptorIndex.xml" />
-        <map:transform src="{lm:projectInfo.transform.descriptorIndex.langIndex}">
+        <map:transform src="{lm:projectInfo.transform.descriptorIndex.indexByLanguage}">
           <map:parameter name="language" value="{1}"/>
         </map:transform>
         <map:transform src="{lm:transform.html.document}"/>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByLanguage.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByLanguage.xsl?rev=327799&r1=327798&r2=327799&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByLanguage.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByLanguage.xsl Sun Oct 23 08:05:48 2005
@@ -8,20 +8,32 @@
   
   <xsl:key name="kDistinctProgLang" match="doap:programming-language" use="."/>
   
+  <xsl:param name="language"/>
+  
   <xsl:template match="/">
     <html>
       <head>
         <title>Projects Indexed by Language</title>
       </head>
       <body>
-        <xsl:for-each select="//doap:programming-language[generate-id() = generate-id(key('kDistinctProgLang',.))]">
-          <xsl:sort select="."/>
-          <xsl:variable name="language" select="."/>
-          <h1><xsl:value-of select="$language"/></h1>
-          <ul>
-            <xsl:apply-templates select="//descriptor[descendant::doap:programming-language = $language]"/>
-          </ul>
-        </xsl:for-each>
+        <xsl:choose>
+          <xsl:when test="$language">
+            <h1>Index of projects using <xsl:value-of select="$language"/></h1>
+            <ul>
+              <xsl:apply-templates select="//descriptor[descendant::doap:programming-language = $language]"/>
+            </ul>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:for-each select="//doap:programming-language[generate-id() = generate-id(key('kDistinctProgLang',.))]">
+              <xsl:sort select="."/>
+              <xsl:variable name="language" select="."/>
+              <h1><xsl:value-of select="$language"/></h1>
+              <ul>
+                <xsl:apply-templates select="//descriptor[descendant::doap:programming-language = $language]"/>
+              </ul>
+            </xsl:for-each>
+          </xsl:otherwise>
+        </xsl:choose>
       </body>
     </html>
   </xsl:template>

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=327799&r1=327798&r2=327799&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 Sun Oct 23 08:05:48 2005
@@ -42,6 +42,12 @@
         displaying information about a given project.</p>
       </notes>
       <action dev="RDG" type="add" context="code" importance="high">
+        Add an automated index page that lists all projects
+        using a specific language. Use 
+        <code>projectDetails/*_lang.xml</code>
+        to retrieve it.
+      </action>
+      <action dev="RDG" type="add" context="code" importance="high">
         Add an automated project index page that lists all projects
         grouped by language. Use <code>projectDetails/programmingLang/index.xml</code>
         to retrieve it.