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/26 14:34:42 UTC
svn commit: r328642 - in
/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo: ./
resources/stylesheets/ src/documentation/ src/documentation/content/xdocs/
Author: rgardler
Date: Wed Oct 26 05:34:19 2005
New Revision: 328642
URL: http://svn.apache.org/viewcvs?rev=328642&view=rev
Log:
add category indexes, do not require adfext:archive element
Added:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByCommon.xsl (with props)
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexBycategory.xsl (with props)
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexBylang.xsl
- copied, changed from r328174, forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByLanguage.xsl
Removed:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByLanguage.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-langIndex_siteSnippet.xsl
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/doap-to-html.xsl
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/index.xml
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/site.xml
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/skinconf.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=328642&r1=328641&r2=328642&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 Wed Oct 26 05:34:19 2005
@@ -118,10 +118,28 @@
-->
+ <!-- Create an HTML page listing all projects categorised by category -->
+ <map:match pattern="projectDetails/category-index.xml">
+ <map:generate type="file" src="cocoon:/projectDetails/descriptorIndex.xml" />
+ <map:transform src="{lm:projectInfo.transform.descriptorIndex.indexBycategory}"/>
+ <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/category/*.xml">
+ <map:generate type="file" src="cocoon:/projectDetails/descriptorIndex.xml" />
+ <map:transform src="{lm:projectInfo.transform.descriptorIndex.indexBycategory}">
+ <map:parameter name="category" value="{1}"/>
+ </map:transform>
+ <map:transform src="{lm:transform.html.document}"/>
+ <map:serialize type="xml-document"/>
+ </map:match>
+
<!-- Create an HTML page listing all projects categorised by programming language -->
<map:match pattern="projectDetails/lang-index.xml">
<map:generate type="file" src="cocoon:/projectDetails/descriptorIndex.xml" />
- <map:transform src="{lm:projectInfo.transform.descriptorIndex.indexByLanguage}"/>
+ <map:transform src="{lm:projectInfo.transform.descriptorIndex.indexBylang}"/>
<map:transform src="{lm:transform.html.document}"/>
<map:serialize type="xml-document"/>
</map:match>
@@ -129,7 +147,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.indexByLanguage}">
+ <map:transform src="{lm:projectInfo.transform.descriptorIndex.indexBylang}">
<map:parameter name="language" value="{1}"/>
</map:transform>
<map:transform src="{lm:transform.html.document}"/>
Added: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByCommon.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByCommon.xsl?rev=328642&view=auto
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByCommon.xsl (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByCommon.xsl Wed Oct 26 05:34:19 2005
@@ -0,0 +1,41 @@
+<?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: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>
+
+ <dl>
+ <dt>
+ <a>
+ <xsl:attribute name="href"><xsl:value-of select="@href-noext"/>.html</xsl:attribute>
+ <xsl:value-of select="$name"/>
+ </a>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="descendant::doap:Project/doap:shortdesc">
+ <xsl:value-of select="descendant::doap:Project/doap:shortdesc"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="descendant::doap:Project/doap:description"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ </dl>
+ </xsl:template>
+</xsl:stylesheet>
+
Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByCommon.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexBycategory.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexBycategory.xsl?rev=328642&view=auto
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexBycategory.xsl (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexBycategory.xsl Wed Oct 26 05:34:19 2005
@@ -0,0 +1,45 @@
+<?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:include href="descriptorIndex-to-indexByCommon.xsl"/>
+
+ <xsl:key name="kDistinctCategory" match="doap:category" use="@rdf:resource"/>
+
+ <xsl:param name="category"/>
+ <xsl:param name="categoryURL">http://projects.apache.org/category/</xsl:param>
+
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title>Projects Indexed by Category</title>
+ </head>
+ <body>
+ <xsl:choose>
+ <xsl:when test="$category">
+ <h1>Index of projects in the category of <xsl:value-of select="$category"/></h1>
+ <xsl:apply-templates select="//descriptor[descendant::doap:category/@rdf:resource = concat($categoryURL, $category)]"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="//doap:category[generate-id() = generate-id(key('kDistinctCategory', @rdf:resource))]">
+ <xsl:sort select="@rdf:resource"/>
+ <xsl:variable name="category" select="@rdf:resource"/>
+ <h1><xsl:value-of select="substring-after($category, $categoryURL)"/></h1>
+ <xsl:apply-templates select="//descriptor[descendant::doap:category[@rdf:resource = $category]]"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="//descriptor[not(descendant::doap:category)]">
+ <h1>Uncategorised</h1>
+ <xsl:apply-templates select="//descriptor[not(descendant::doap:category)]"/>
+ </xsl:if>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>
+
Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexBycategory.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Copied: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexBylang.xsl (from r328174, 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-indexBylang.xsl?p2=forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexBylang.xsl&p1=forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-indexByLanguage.xsl&r1=328174&r2=328642&rev=328642&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-indexBylang.xsl Wed Oct 26 05:34:19 2005
@@ -6,6 +6,8 @@
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:doap="http://usefulinc.com/ns/doap#">
+ <xsl:include href="descriptorIndex-to-indexByCommon.xsl"/>
+
<xsl:key name="kDistinctProgLang" match="doap:programming-language" use="."/>
<xsl:param name="language"/>
@@ -19,43 +21,24 @@
<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:apply-templates select="//descriptor[descendant::doap:programming-language = $language]"/>
</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:apply-templates select="//descriptor[descendant::doap:programming-language = $language]"/>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
+
+ <xsl:if test="//descriptor[not(descendant::doap:programming-language)]">
+ <h1>Unkown Language</h1>
+ <xsl:apply-templates select="//descriptor[not(descendant::doap:programming-language)]"/>
+ </xsl:if>
</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>
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-langIndex_siteSnippet.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-langIndex_siteSnippet.xsl?rev=328642&r1=328641&r2=328642&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-langIndex_siteSnippet.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-langIndex_siteSnippet.xsl Wed Oct 26 05:34:19 2005
@@ -16,7 +16,7 @@
<xsl:variable name="name" select="."/>
<xsl:element name="{$name}">
<xsl:attribute name="label"><xsl:value-of select="$name"/></xsl:attribute>
- <xsl:attribute name="href"><xsl:value-of select="$name"/>-lang.html</xsl:attribute>
+ <xsl:attribute name="href"><xsl:value-of select="$name"/>_lang.html</xsl:attribute>
<xsl:attribute name="description">All projects using <xsl:value-of select="$name"/></xsl:attribute>
</xsl:element>
</xsl:for-each>
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/doap-to-html.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/doap-to-html.xsl?rev=328642&r1=328641&r2=328642&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/doap-to-html.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/doap-to-html.xsl Wed Oct 26 05:34:19 2005
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version = "1.0"
- xmlns:atom="http://www.w3.org/2005/atom"
+ xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
@@ -95,7 +95,7 @@
<xsl:template match="doap:category">
<a>
- <xsl:attribute name="href"><xsl:value-of select="./@rdf:resource" /></xsl:attribute>
+ <xsl:attribute name="href">category/<xsl:value-of select="substring-after(@rdf:resource, 'category/')" />.html</xsl:attribute>
<xsl:value-of select="substring-after(@rdf:resource, 'category/')"/>
</a>
<xsl:if test="not(position() = last())">
@@ -129,7 +129,7 @@
</xsl:template>
<xsl:template name="project-header">
- <div class="header">
+ <div class="projectHeader">
<h1><xsl:value-of select="doap:name" /></h1>
</div>
<div class="description">
@@ -221,14 +221,21 @@
<xsl:when test="asfext:subscribe">
<xsl:value-of select="asfext:subscribe/@rdf:resource"/>
</xsl:when>
- <xsl:otherwise>
- mailto:<xsl:value-of select="substring-before(doap:name,'@')"/>-subscribe@<xsl:value-of select="substring-after(doap:name,'@')"/>
- </xsl:otherwise>
+ <xsl:otherwise>mailto:<xsl:value-of select="substring-before(doap:name,'@')"/>-subscribe@<xsl:value-of select="substring-after(doap:name,'@')"/></xsl:otherwise>
</xsl:choose>
</xsl:attribute>Subscribe</a></td>
- <td class="right"><a><xsl:attribute name="href">
+ <td class="right">
+ <xsl:choose>
+ <xsl:when test="asfext:archives">
+ <a><xsl:attribute name="href">
<xsl:value-of select="asfext:archives/@rdf:resource"/>
- </xsl:attribute>Archives</a></td>
+ </xsl:attribute>Archives</a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Not Archived</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
</tr>
</xsl:template>
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/index.xml?rev=328642&r1=328641&r2=328642&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/index.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/index.xml Wed Oct 26 05:34:19 2005
@@ -31,7 +31,7 @@
<li><a href="changes.html">Recent Changes</a></li>
<li><a href="todo.html">ToDo list</a></li>
<li><a href="releaseNotes_0.1.html">Release Notes</a></li>
- <li><a href="projectDetails.html">Project Details</a></li>
+ <li><a href="projectDetails/projectDetails.html">Project Details</a></li>
</ul>
</section>
@@ -94,7 +94,7 @@
<p>You can use the projectInfo plugin to pull together project
information for multiple projects. For example, take a look at
the project details for
- <a href="projectDetails.forrest.html">Apache Forrest</a>.</p>
+ <a href="projectDetails/projectDetails.forrest.html">Apache Forrest</a>.</p>
<p>Using the locatoinmap you can retrieve this content from
anywhere you want, for example, the DOAP file for the Forrest
@@ -102,7 +102,7 @@
assured of it being up to date.</p>
<p>To retrieve the project details of another project make a request
- for <code>projectDetails.[PROJECT_NAME].html</code>. For this to work
+ for <code>projectDetails/projectDetails.[PROJECT_NAME].html</code>. For this to work
your project locationmap muest have an entry like this:</p>
<source><![CDATA[
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=328642&r1=328641&r2=328642&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 Wed Oct 26 05:34:19 2005
@@ -54,7 +54,11 @@
<xi:include href="cocoon://projectDetails/lang_index.siteSnippet.xml"/>
</navIndexes>
<pageIndexes label="Page Indexes">
- <languages label="Index by Language" href="programmingLang/index.html"
+ <languages label="Index by Language" href="lang-index.html"
+ description="A list of all projects, indexed by language"/>
+ <languages label="Java Index" href="Java_lang.html"
+ description="A list of Jave projects"/>
+ <languages label="Index by Category" href="category-index.html"
description="A list of all projects, indexed by language"/>
</pageIndexes>
</projects>
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/skinconf.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/skinconf.xml?rev=328642&r1=328641&r2=328642&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/skinconf.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/skinconf.xml Wed Oct 26 05:34:19 2005
@@ -159,9 +159,9 @@
-->
<motd>
<motd-option pattern="">
- <motd-title>v0.7</motd-title>
+ <motd-title>v0.8</motd-title>
<motd-page location="alt">
- This is documentation for current version v0.7
+ This is documentation for current version v0.8
</motd-page>
<motd-page-url>http://forrest.apache.org/versions/index.html</motd-page-url>
</motd-option>
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=328642&r1=328641&r2=328642&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 Wed Oct 26 05:34:19 2005
@@ -43,6 +43,17 @@
</notes>
<action dev="RDG" type="add" context="code" importance="high">
Add an automated index page that lists all projects
+ in a category. Use
+ <code>projectDetails/category/*.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 Category. Use <code>projectDetails/category-index.xml</code>
+ to retrieve it.
+ </action>
+ <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.