Alan wrote:WARNING: I tried to compress many hours of brainstorming over two occasions into this twenty minute e-mail. Since we are all tossing ideas around anyway, I don't apologize for the disorganization of the ideas.
I'd like to generate an XML calendar for navigation of my blog.
Is there a Calendar generator for Cocoon?
One doesn't yet exist - how would you picture it working?
Geoff
I have some rather involved notes in one of my idea books. I envision this as a transformer, really, but then I remember a long conversation at Starbucks about the "generator mindset" vs. the "transformer mindset" with you and Jack.
The transformer would look for something like <cal:calendar/>. As seen in many PIM programs, the resulting content has many different incarnations. Conceptually, I envision this as a view of some time period, subdivided arbitrarily. A view of the current month would probably be the default output, with alternatives being multiple months, a single week or multiple weeks, or even a single day with multiple time slices being displayed.
Additionally, I could see the transformer looking for content inside the element, for example [1]. (I read somewhere that footnotes in e-mail is bad for some reason.. anyone know why?) I think this is one of the cool parts of the idea... a calendar is really a representation of a set of events. Therefore the input to the transformer would be a set of events and some parameters for how to display them.
So, now to think about output. Since I see this as a view component, the goal of the output is to balance a certain amount of layout information with a certain amount of display flexibility. Here's a shot at the single month output: [2].
The reason for all the layers here is that I'd like to be able to suck in an ical, an apache log file, or anything else one could think of as a set of events. I have two mid-term use cases:
1. visualization of timesheet data
2. shared calendar display (using webdav for shared versioned access to ical files I think)
Well, I'd love to hear some thoughts from people who have done more with Cocoon than I... yes you Geoff :)
-- Ryan Hoegg ISIS Networks http://www.isisnetworks.net/
[1]
<cal:calendar type="month" start="2004-04-01">
<event type="day" start="2004-04-01">
<description>April Fool's Day<description>
<type>holiday</type>
<!-- hmm, wouldn't it be neat to have inheritance? "holiday" could be a subtype of "day" -->
</event>
<event type="day" start="2004-04-18">
Mom's Birthday
<!-- not sure whether the description should just be a text node... -->
</event>
<event start="2004-04-10T12:00:00" end="2004-04-10T13:30:00">
Lunch with Geoff
<!-- I chose a bastardized ISO8601 for now, but am very open to alternatives... should time be a separate attribute? Should the start time and duration information be moved to a nested element? -->
</event>
<event start="2004-04-20T19:00">
Mom's Birthday Party
<!-- How would you denote that the end time is unknown? Perhaps even allow endpoints to be time ranges? that smacks of Speculative Generality... -->
</event>
</cal:calendar>
[2]
<month name="April" year="2004" firstday="sunday"> <!-- maybe it should be <calendar type="month"/>... not sure -->
<week> <!-- there are three days in the first week displayed. Not sure whether to include their date, it could be inferred from the ordinal position -->
<day type="holiday">April Fool's Day</day>
<day/>
<day/>
</week>
<week>
<!-- trying on inclusion of date numbers different ways -->
<day date="4"/>
<day date="5" name="monday"/>
<day><date>6</date></day>
<day><date number="7"/></day>
<day date="8"><weekday name="thursday"/></day>
<day date="9"/>
<day date="10">Lunch with Geoff - 12:00pm to 1:30pm</day>
</week>
<week>
<!-- this one just occurred to me, as we specified the first day of the week in a month attribute -->
<!-- depending on ordinal position (would need some fancier logic in the transformer/stylesheet) -->
<sunday/><monday/>
<!-- explicit dates -->
<tuesday date="13"/><wednesday date="14"/><thursday date="15"/><friday date="16"/><saturday date="17"/>
</week>
<week>
<!-- a more minimalist approach is also possible, including only dates that have events in this document and leaving it to the display to fill in the blanks -->
<!-- Idea 1, use something from the above ideas -->
<date number="18">Mom's Birthday</date>
<!-- Idea 2, just dump the events in here and let the display handle it... feels like passing the buck though -->
<event start="2004-04-20T19:00">Mom's Birthday Party</event>
</week>
<week><!-- with that idea, an empty week would be an empty element --></week>
</month>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
