You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by hg...@cswebmail.com on 2003/03/11 14:11:30 UTC

Dynamically generate RSS feed for Cocoon portal from XML files

Dear all,

I would like to dynamically generate an RSS feed from
currently available XML files in a folder on my
webserver to be displayed in the Cocoon portal.

I have a set of equally structured XML files in a
folder and new files are added to this folder regularly.

Now I want to generate the RSS feed dynamically when
the respective coplet displays the RSS in the portal.

The RSS file should reflect the title of these XML
files (which is in the dc:title tag of each file) and
the URI (the path + filename).

Any ideas are greatly appreciated, hope someone has
done similar things before - otherwise I would need to
start from scratch.

Kind regards,

Holger

___________________________________________________
The ALL NEW CS2000 from CompuServe
 Better!  Faster! More Powerful!
 250 FREE hours! Sign-on Now!
 http://www.compuserve.com/trycsrv/cs2000/webmail/





---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Dynamically generate RSS feed for Cocoon portal from XML files

Posted by Jeff Turner <je...@apache.org>.
On Tue, Mar 11, 2003 at 05:11:30AM -0800, hgadm@cswebmail.com wrote:
> Dear all,
> 
> I would like to dynamically generate an RSS feed from
> currently available XML files in a folder on my
> webserver to be displayed in the Cocoon portal.
> 
> I have a set of equally structured XML files in a
> folder and new files are added to this folder regularly.
> 
> Now I want to generate the RSS feed dynamically when
> the respective coplet displays the RSS in the portal.
> 
> The RSS file should reflect the title of these XML
> files (which is in the dc:title tag of each file) and
> the URI (the path + filename).
> 
> Any ideas are greatly appreciated, hope someone has
> done similar things before - otherwise I would need to
> start from scratch.

If you're using Cocoon 2.1, the XPathDirectoryGenerator might be useful.
It lets you extract XPath-specified nodes from every file in a directory.

For example, to generate http://aft.sourceforge.net/examples/index.html
I used:

   <map:match pattern="examples/index.xml">
     <map:generate type="xpathdirectory"
      src="content/xdocs/examples#/project/description/text()"/>
     <map:transform src="resources/stylesheets/antdirectory2document.xsl"/>
     <map:serialize type="xml"/>
   </map:match>


--Jeff

> Kind regards,
> 
> Holger
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org