forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r581227 - in /forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder: ./ src/documentation/content/xdocs/ src/documentation/content/xdocs/samples/
Date Tue, 02 Oct 2007 13:17:18 GMT
Author: rgardler
Date: Tue Oct  2 06:17:18 2007
New Revision: 581227

URL: http://svn.apache.org/viewvc?rev=581227&view=rev
Log:
- add new feature to aggregate content from tagged resources (such as social bookmarking sites)
- improve documentation

Added:
    forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/samples/singleFeed.xml
Removed:
    forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/samples/aggregateDescriptor.xml
    forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/samples/feedDescriptor.xml
Modified:
    forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/input.xmap
    forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/locationmap.xml
    forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/index.xml
    forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/samples/aggregateFeed.xml
    forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/site.xml

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/input.xmap
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/input.xmap?rev=581227&r1=581226&r2=581227&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/input.xmap (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/input.xmap Tue Oct  2 06:17:18
2007
@@ -23,15 +23,20 @@
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
   <map:pipelines>
     <map:pipeline>
+      
+      <map:match pattern="**/*.tagFeed.rss.xml">
+        <map:generate src="cocoon://{1}/{2}.tagFeed.rss"/>
+        <map:transform src="{lm:feeder.transform.rss.document}"/>
+        <map:serialize type="xml"/>
+      </map:match>
+      
       <map:match pattern="*.rss.xml">
-        <map:generate src="{lm:project.{1}.xml}"/>
-        <map:transform src="{lm:feeder.transform.feedDesc.RSS20}"/>
+        <map:generate src="cocoon://{1}.rss"/>
         <map:transform src="{lm:feeder.transform.rss.document}"/>
         <map:serialize type="xml"/>
       </map:match>
       <map:match pattern="**/*.rss.xml">
-        <map:generate src="{lm:project.{1}/{2}.xml}"/>
-        <map:transform src="{lm:feeder.transform.feedDesc.RSS20}"/>
+        <map:generate src="cocoon://{1}/{2}.rss"/>
         <map:transform src="{lm:feeder.transform.rss.document}"/>
         <map:serialize type="xml"/>
       </map:match>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/locationmap.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/locationmap.xml?rev=581227&r1=581226&r2=581227&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/locationmap.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/locationmap.xml Tue Oct 
2 06:17:18 2007
@@ -31,5 +31,8 @@
     <match pattern="feeder.transform.*.*">
       <location src="resources/stylesheets/{1}-to-{2}.xsl" />
     </match>
+    <match pattern="feeder.tag-*.sources">
+      <location src="resources/taggedSources.xml"/>
+    </match>
   </locator>
 </locationmap>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/index.xml?rev=581227&r1=581226&r2=581227&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/index.xml
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/index.xml
Tue Oct  2 06:17:18 2007
@@ -34,16 +34,122 @@
         samples tab).
       </p>
       <section>
-        <title>Working Features</title>
-        <ol>
-          <li><a href="samples/singleFeed.html">Embedding of an RSS</a>
feed in a Forrest page</li>
-        </ol>
+        <title>Usable Features</title>
+        <section>
+          <title>Embeding an RSS Feed in a Forrest content object</title>
+          
+          <p>
+              This sample shows how a single RSS feed can be converted to an XDoc and
+              included in a Forrest site. In order to do this you must first create a
+              <code>feedDescriptor</code> file. This describes all the feeds
that your
+              project knows about. A simple example is:
+            </p>
+            <source>
+        <![CDATA[
+        <feedDescriptor>
+          <feed id="BBCSport_UK">
+            <url>http://news.bbc.co.uk/rss/sportonline_uk_edition/front_page/rss.xml</url>
+          </feed>
+        </feedDescriptor>
+            ]]>
+            </source>
+            <p>
+              In order to embed the data from the <code>planetApache</code> feed
you
+              create a link in the following form:
+            </p>
+            <source>&lt;a href="PATH_TO_FEED_DESCRIPTOR/FEED_DESCRIPTOR_NAME.rss.EXTENSION&gt;</source>
+            <p>
+              In this URL you must replace <code>PATH_TO_FEED_DESCRIPTOR</code>
with the
+              directory path to your feed descriptor file,
+              <code>FEED_DESCRIPTOR_NAME</code> with the name of the descriptor
file,
+              and <code>EXTENSION</code> with the extension indicating the format
you
+              want the feed to be delivered in (i.e. html, pdf etc.)
+            </p>
+          <ul>
+            <li><a href="samples/singleFeed.rss">As RSS</a></li>
+            <li><a href="samples/singleFeed.rss.xml">As XDoc</a></li>
+            <li><a href="samples/singleFeed.rss.html">As HTML</a></li>
+          </ul>
+        </section>
       </section>
       <section>
         <title>In Progress Features</title>
-        <ol>
-          <li><a href="samples/aggregateFeed.html">Aggregation of multiple feeds</a>
into a single page</li>
-        </ol>
+        <section>
+          <title>Aggregation</title>
+            
+            <note>aggregation works but is quite inflexible at present</note>
+            
+            <p>
+              This sample shows how a number of different feeds can be aggregated into a
+              single feed and then displayed in a Forrest site. Creating an aggregated
+              feed is no different to embedding a <a href="singleFeed.xml">single
+              feed</a>. Simply add more feeds into your feed descriptor file and then
+              link to it in the same way.
+            </p>
+            <p>
+              For example:
+            </p>
+            <source>
+        <![CDATA[
+        <feedDescriptor>
+          <feed id="BBCSport_UK">
+            <url>http://news.bbc.co.uk/rss/sportonline_uk_edition/front_page/rss.xml</url>
+          </feed>
+          <feed id="USAToday_Sports">
+            <url>http://www.usatoday.com/repurposing/SportsRss.xml</url>
+          </feed>
+        </feedDescriptor>
+        ]]>
+            </source>
+            <ul>
+              <li><a href="samples/aggregateFeed.rss">As RSS</a></li>
+              <li><a href="samples/aggregateFeed.rss.xml">As XDoc</a></li>
+              <li><a href="samples/aggregateFeed.rss.html">As HTML</a></li>
+            </ul>
+        </section>
+        
+        <section>
+          <title>Tag Aggregation</title>
+          <p>Aggregate feeds from multiple tagged sources, for example,
+          include commonly tagged resources from multiple social bookmarking services.</p>
+          
+          <note>It works but doesn't remove duplicates and since it uses the aggregation
templates
+          (see above) is quite inflexible.</note>
+          
+          <section>
+            <title>Configuration</title>
+            <p>The feeder plugin provides a default set of resources that will be
+            used for all tag aggregation requests. To customise this configuration 
+            you need to provide a locationmap match in your project locationmap like the
following:</p>
+            
+            <source><![CDATA[
+    <match pattern="feeder.tag-[DESIRED_TAG].sources>
+      <location src="resources/taggedSources.xml"/>
+    </match>
+            ]]></source> 
+            
+            <p>Remember to replace [DESIRED-TAG] with your chosen tag, or, if you want
to use
+            the same sources for all tags us a '*'.</p> 
+            
+            <p>Replace the source file with one of your own that describes the locations
to retrieve content from.
+            This document should be in the following format:</p>
+            
+            <p>Now request you resource with the URL:</p>
+            
+            <source>http://foo.org/DESIRED-TAG.tagFeed.rss.html</source>
+            
+            <p>For example, the following links aggregate content using the "JISCCommunityDevelopment"
+            tag:</p>
+            
+            <source><![CDATA[
+            ]]></source> 
+            <ul>
+              <li><a href="samples/JISCCommunityDevelopment.tagFeed.rss">As RSS</a></li>
+              <li><a href="samples/JISCCommunityDevelopment.tagFeed.rss.xml">As
XDoc</a></li>
+              <li><a href="samples/JISCCommunityDevelopment.tagFeed.rss.html">As
HTML</a></li>
+            </ul>
+          </section>
+        </section>
       </section>
     </section>
   </body>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/samples/aggregateFeed.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/samples/aggregateFeed.xml?rev=581227&r1=581226&r2=581227&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/samples/aggregateFeed.xml
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/samples/aggregateFeed.xml
Tue Oct  2 06:17:18 2007
@@ -15,24 +15,6 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
-<document>
-  <header>
-    <title>Feeder Plugin - Aggregate Feed example</title>
-  </header>
-  <body>
-    <p>
-      This sample shows how a number of different feeds can be aggregated into a
-      single feed and then displayed in a Forrest site. Creating an aggregated
-      feed is no different to embedding a <a href="singleFeed.xml">single
-      feed</a>. Simply add more feeds into your feed descriptor file and then
-      link to it in the same way.
-    </p>
-    <p>
-      For example:
-    </p>
-    <source>
-<![CDATA[
 <feedDescriptor>
   <feed id="BBCSport_UK">
     <url>http://news.bbc.co.uk/rss/sportonline_uk_edition/front_page/rss.xml</url>
@@ -41,11 +23,3 @@
     <url>http://www.usatoday.com/repurposing/SportsRss.xml</url>
   </feed>
 </feedDescriptor>
-]]>
-    </source>
-    <p>
-      <a href="aggregateDescriptor.rss.html">Take a look</a> at what the above
-      file produces.
-    </p>
-  </body>
-</document>

Added: forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/samples/singleFeed.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/samples/singleFeed.xml?rev=581227&view=auto
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/samples/singleFeed.xml
(added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/samples/singleFeed.xml
Tue Oct  2 06:17:18 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<feedDescriptor>
+  <feed id="BBCSport_UK">
+    <url>http://news.bbc.co.uk/rss/sportonline_uk_edition/front_page/rss.xml#</url>
+  </feed>
+</feedDescriptor>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/site.xml?rev=581227&r1=581226&r2=581227&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/site.xml
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.feeder/src/documentation/content/xdocs/site.xml
Tue Oct  2 06:17:18 2007
@@ -35,11 +35,6 @@
     <changes label="Changes" href="changes.html" description="History of Changes" />
     <todo label="Todo" href="todo.html" description="Todo List" />
   </about>
-  <samples label="Samples" href="samples/" tab="samples">
-    <index label="Index" href="index.html" description="An index of the available samples"/>
-    <singleFeed label="Single Feed" href="singleFeed.html" description="An example of
a single feed in a Forrest page"/>
-    <aggregate label="Aggregate Feed" href="aggregateFeed.html" description="An example
of an aggregate feed in a Forrest page"/>
-  </samples>
 <!--
   The href must be wholesite.html/pdf  You can change the labels and node names
   <all label="All">



Mime
View raw message