Author: rgardler
Date: Wed Mar 21 12:19:44 2007
New Revision: 520975
URL: http://svn.apache.org/viewvc?view=rev&rev=520975
Log:
Add handling of RSS feeds (FOR-967, thanks to Stuart Yeates)
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/doap-to-document.xsl
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/status.xml
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/doap-to-document.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/doap-to-document.xsl?view=diff&rev=520975&r1=520974&r2=520975
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/doap-to-document.xsl
(original)
+++
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/doap-to-document.xsl
Wed Mar 21 12:19:44 2007
@@ -20,6 +20,8 @@
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#"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:asfext="http://projects.apache.org/ns/asfext#"
>
@@ -91,7 +93,6 @@
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:template>
-
<xsl:template match="doap:category">
<xsl:value-of select="@rdf:resource"/>
<xsl:if test="not(position() = last())">
@@ -99,6 +100,32 @@
</xsl:if>
</xsl:template>
+ <xsl:template match="foaf:seeAlso">
+ <xsl:choose>
+ <xsl:when test="@dc:format='application/rss+xml'">
+ <a class="rss-rss-link">
+ <xsl:attribute name="href">
+ <xsl:value-of select="@rdf:resource"/>
+ </xsl:attribute> RSS
+ </a>
+ </xsl:when>
+ <xsl:when test="@dc:format='application/atom+xml'">
+ <a class="rss-atom-link">
+ <xsl:attribute name="href">
+ <xsl:value-of select="@rdf:resource"/>
+ </xsl:attribute> Atom
+ </a>
+ </xsl:when>
+ <xsl:when test="@dc:format='application/rdf+xml'">
+ <a class="rss-rdf-link">
+ <xsl:attribute name="href">
+ <xsl:value-of select="@rdf:resource"/>
+ </xsl:attribute> RDF
+ </a>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
<xsl:template name="project-header">
<div class="description">
<p>
@@ -210,6 +237,19 @@
<xsl:choose>
<xsl:when test="doap:homepage/@*">
<xsl:apply-templates select="doap:homepage/@*" />
+ </xsl:when>
+ <xsl:otherwise>
+ None Defined
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ <tr>
+ <td class="left">RSS Feeds</td>
+ <td class="right">
+ <xsl:choose>
+ <xsl:when test="foaf:seeAlso">
+ <xsl:apply-templates select="foaf:seeAlso" />
</xsl:when>
<xsl:otherwise>
None Defined
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/status.xml
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/status.xml?view=diff&rev=520975&r1=520974&r2=520975
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/status.xml
(original)
+++
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/status.xml
Wed Mar 21 12:19:44 2007
@@ -38,6 +38,9 @@
<changes>
<!-- Add new releases here -->
<release version="0.1" date="not-released">
+ <action dev="RDG" type="add" context="code" due-to="Stuart Yeates"
fixes-bug="FOR-967">
+ Add handling of RSS feeds.
+ </action>
<action dev="RDG" type="add" context="code">
content-doap-link dispatcher template to embed a link to the
raw DOAP files within an output HTML file.