cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven D. Majewski" <>
Subject Re: Create New File
Date Sat, 13 Jan 2007 22:19:12 GMT

On Jan 12, 2007, at 2:14 PM, BMur wrote:

> Thanks for the reply Steve.  I apologize for not being clear.   
> Since this is
> a Cocoon mailing list I was trying not to add too much Lenya stuff,  
> but
> obviously I'm not sending enough details.
> Here is my goal -
> I'm using Cocoon 2.1.7 and Lenya 1.2.4, and in Lenya (for those  
> that are
> unfamiliar) you can create/edit pages in an authoring environment,  
> and when
> done the page can be published to show in the live area of the  
> site.  When
> creating/editing a page you can add a metadata attribute (tags)  
> which shows
> up as <dc:subject>news</dc:subject> in the generated xml content file
> (assuming the page was tagged as "news").  What I would like to do  
> while
> publishing and deactivating a page is to add it to an rss feed  
> file.  So, if
> the page is tagged as news (as in my example), when publishing I'd  
> like to
> first check to see if news.rss exists, and if it doesn't create and  
> build
> the file.  This would build the regular rss tags, including one  
> entry with
> the pages information (title, description, etc).  If the page already
> exists, I simply want to append a new rss item to the list.
> I may have been attempting to do this from the wrong location
> (usecase.xmap), however my first goal was trying to actually create  
> a file
> with the default rss xml tags (channel, items, etc).
> If I'm going about this the wrong way and you have any adivse, it  
> would be
> appreciated.
> -- 

Do I have this right ? :

	The user is uploading or somehow creating an xml file with lenya.
	When that happens, you want to generate an RSS item from data in  
that file
	( and either append it to an existing RSS item list, or create a new  
one )

If the original item is in xml, then I would use xslt to generate the  
rss item.
I don't have much experience with source-writer, but it looks like  
that could
be used to do the appending. If you have to tie a whole sequence of  
steps together,
then flowscript may be the best way to do that.

[ You could also just leave each rss fragment in it's own file and  
collect them
    together as another step -- what's best probably depends on  
details. ]

In general: if you're new to cocoon, it would be worth the time to  
start out looking
at some of the samples and trying out some simple stuff first until  
you understand
the cocoon processing model. I don't know if those are included in  
lenya (probably
not). You can probably run both webapps ( lenya.war and cocoon ) side  
by side in

Cocoon documentation leaves a bit to be desired. Cocoon has been  
quite a moving target,
and the existing books, while useful, all hardly touch some of the  
newer methods, which
seem to be the preferred way of doing things now. ( The main  
components I'm using seem
to be: xslt, xinclude, jx (generator/transformer) & flowscript. I  
also started trying
the authorization framework, but that seems to be deprecated in the  
latest release. )

-- Steve Majewski - University of Virginia Alderman Library

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message