cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <>
Subject Re: Calendar Generator
Date Wed, 21 Apr 2004 08:53:32 GMT
Sorry to drop into this discussion this late, but I completely failed to 
notice it and started to implement a CalendarGenerator by myself. You 
can find it in CVS head [1].

I took the opposite road form the one advocated by Geoff. My 
CalendarGenerator is designed to output a "blank" calendar for any 
month, that is without any event attached to dates.

It allows for extensibility through subclassing. Just override the:

	void addContent(Calendar date, Locale locale)

method in your subclass. It will be called once for every calendar day 
in the month.

If you want to attach events to dates, my suggestion is that you parse 
your events source (say, an iCal file) in the "setup" method and store 
events in a suitable data structure, indexed by date. Then, in the 
overridden "addContent" method, find the events for the "date" arguments 
and output the desidered XML elements.




View raw message