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 12:43:30 UTC
svn commit: r327772 - in
/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo: ./
resources/stylesheets/ src/documentation/content/xdocs/
Author: rgardler
Date: Sun Oct 23 03:43:10 2005
New Revision: 327772
URL: http://svn.apache.org/viewcvs?rev=327772&view=rev
Log:
add an index page listing all projects categorised by programming language
Added:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByLanguage.xsl (with props)
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-langIndex.xsl
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/site.xml
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=327772&r1=327771&r2=327772&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 03:43:10 2005
@@ -111,16 +111,24 @@
<!-- FIXME: create the XSL for this pipeline
<map:match pattern="projectDetails/index.xml">
- <map:generate type="file" src="cocoon:/projectDetails/descrptorIndex.xml" />
+ <map:generate type="file" src="cocoon:/projectDetails/descriptorIndex.xml" />
<map:transform src="{lm:projectInfo.transform.descriptorIndex.html}"/>
<map:serialize type="xml-document"/>
</map:match>
-->
+ <!-- Create an HTML page listing all projects categorised by programming language -->
+ <map:match pattern="projectDetails/programmingLang/index.xml">
+ <map:generate type="file" src="cocoon:/projectDetails/descriptorIndex.xml" />
+ <map:transform src="{lm:projectInfo.transform.descriptorIndex.indexByLanguage}"/>
+ <map:transform src="{lm:transform.html.document}"/>
+ <map:serialize type="xml-document"/>
+ </map:match>
+
<!-- Create an HTML page listing all projects using the indicated language -->
<map:match pattern="projectDetails/*_lang.xml">
- <map:generate type="file" src="cocoon:/projectDetails/descrptorIndex.xml" />
+ <map:generate type="file" src="cocoon:/projectDetails/descriptorIndex.xml" />
<map:transform src="{lm:projectInfo.transform.descriptorIndex.langIndex}">
<map:parameter name="language" value="{1}"/>
</map:transform>
@@ -137,7 +145,7 @@
all known programming languages for projects specified in
locationmap-projects.xml file.
-->
- <map:match pattern="projectDetails/descrptorIndex.xml">
+ <map:match pattern="projectDetails/descriptorIndex.xml">
<map:generate type="file" src="{project:content}/locationmap.xml" />
<map:transform src="{lm:projectInfo.transform.locationmap.descriptorIndex}"/>
<map:transform type="cinclude"/>
@@ -150,7 +158,7 @@
specified in locationmap-projects.xml file.
-->
<map:match pattern="projectDetails/lang_index.siteSnippet.xml">
- <map:generate type="file" src="cocoon:/projectDetails/descrptorIndex.xml" />
+ <map:generate type="file" src="cocoon:/projectDetails/descriptorIndex.xml" />
<map:transform src="{lm:projectInfo.transform.descriptorIndex.langIndex_siteSnippet}"/>
<map:serialize type="xml-document"/>
</map:match>
@@ -160,7 +168,7 @@
known in the locationmap-projects.xml file.
-->
<map:match pattern="projectDetails/index.siteSnippet.xml">
- <map:generate type="file" src="cocoon:/projectDetails/descrptorIndex.xml" />
+ <map:generate type="file" src="cocoon:/projectDetails/descriptorIndex.xml" />
<map:transform src="{lm:projectInfo.transform.descriptorIndex.siteSnippet}"/>
<map:serialize type="xml-document"/>
</map:match>
@@ -171,7 +179,7 @@
programming language.
-->
<map:match pattern="projectDetails/language-*/index.siteSnippet.xml">
- <map:generate type="file" src="cocoon:/projectDetails/descrptorIndex.xml" />
+ <map:generate type="file" src="cocoon:/projectDetails/descriptorIndex.xml" />
<map:transform src="{lm:projectInfo.transform.descriptorIndex.siteSnippet}">
<map:parameter name="name" value="{1}"/>
<map:parameter name="progLanguage" value="{1}"/>
Added: 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=327772&view=auto
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByLanguage.xsl (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByLanguage.xsl Sun Oct 23 03:43:10 2005
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version = "1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:doap="http://usefulinc.com/ns/doap#">
+
+ <xsl:key name="kDistinctProgLang" match="doap:programming-language" use="."/>
+
+ <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>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="descriptor">
+ <xsl:variable name="name">
+ <xsl:choose>
+ <xsl:when test="descendant::doap:Project/doap:shortname">
+ <xsl:value-of select="descendant::doap:Project/doap:shortname"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="descendant::doap:Project/doap:name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <li>
+ <a>
+ <xsl:attribute name="href"><xsl:value-of select="@href-noext"/>.html</xsl:attribute>
+ <xsl:value-of select="$name"/>
+ </a>
+ </li>
+ </xsl:template>
+</xsl:stylesheet>
+
Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByLanguage.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-langIndex.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-langIndex.xsl?rev=327772&r1=327771&r2=327772&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-langIndex.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-langIndex.xsl Sun Oct 23 03:43:10 2005
@@ -20,9 +20,10 @@
<h1>Index of Projects using the <xsl:value-of select="$language"/> Programming language</h1>
<ul>
<xsl:for-each select="//doap:Project[doap:programming-language = $language]/doap:name">
+
<li>
<a>
- <xsl:attribute name="href">/projectDetails.<xsl:value-of select="."/>.html</xsl:attribute>
+ <xsl:attribute name="href"><xsl:value-of select="ancestor::descriptor/@href-noext"/>.html</xsl:attribute>
<xsl:value-of select="."/>
</a>
</li>
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/site.xml?rev=327772&r1=327771&r2=327772&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/site.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/site.xml Sun Oct 23 03:43:10 2005
@@ -48,9 +48,15 @@
</about>
<projects label="Projects" href="projectDetails/">
- <xi:include href="cocoon://projectDetails/index.siteSnippet.xml"/>
- <xi:include href="cocoon://projectDetails/language-Java/index.siteSnippet.xml"/>
- <xi:include href="cocoon://projectDetails/lang_index.siteSnippet.xml"/>
+ <navIndexes label="Navigation Indexes">
+ <xi:include href="cocoon://projectDetails/index.siteSnippet.xml"/>
+ <xi:include href="cocoon://projectDetails/language-Java/index.siteSnippet.xml"/>
+ <xi:include href="cocoon://projectDetails/lang_index.siteSnippet.xml"/>
+ </navIndexes>
+ <pageIndexes label="Page Indexes">
+ <languages label="Index by Language" href="programmingLang/index.html"
+ description="A list of all projects, indexed by language"/>
+ </pageIndexes>
</projects>
<!--
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=327772&r1=327771&r2=327772&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 03:43:10 2005
@@ -36,11 +36,16 @@
<changes>
<!-- Add new releases here -->
- <release version="0.2" date="unreleased">
+ <release version="0.3-dev" date="unreleased">
<notes>
<p>This plugin provides various mechanisms for extracting and
displaying information about a given project.</p>
</notes>
+ <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.
+ </action>
<action dev="RDG" type="add" context="code" importance="high">
Add an automated index page for all projects using a specified
programming language. Use <code>projectDetails/*_lang.xml</code>