You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alan <al...@engrm.com> on 2004/03/19 20:43:20 UTC

Calendar Generator

    I'd like to generate an XML calendar for navigation of my blog.

    Is there a Calendar generator for Cocoon?

-- 
Alan / alan@engrm.com / http://engrm.com/
available for contract  -->  http://engrm.com/the-pitch.html

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


Re: Calendar Generator

Posted by John Lianoglou <ya...@mac.com>.
Ha! Well, looks like the there's even documentation on how to translate 
icalendar to RDF, as well. Good call on that.  :)



jL

On Mar 22, 2004, at 7:56 PM, Stan Dyck wrote:

> If I'm not mistaken, the xcal effort has stalled because they seem to 
> be moving in the direction of rdf. There is an rdf calendar task force 
> announcement at:
>
> http://www.ilrt.bris.ac.uk/discovery/2001/04/calendar/
>
> You might want to consider monitoring this instead of using xcal.
>
>
> On Mar 21, 2004, at 9:25 PM, John Lianoglou wrote:
>
>>> That is my instinct as well.  Unfortunately, everything seems to use 
>>> iCal
>>> (mozilla, outlook, apple iCal) and from what I can find xcal seems 
>>> to be stuck
>>> between draft 2 (from 2002?) and draft 3 which may change things up
>>> significantly if it is ever finished.
>>
>> Well, I feel like the xcal draft 2 features will be more than 
>> sufficient for use in cocoon. Thought if there were a draft 3 
>> actually in active development, I'd naturally agree it's definitely 
>> worth planning for.  :)
>
> Stan Dyck
>
> Note: I've sworn off sending email attachments. If you get an email 
> from my address with an attachment, don't open it.


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


Re: Calendar Generator

Posted by Stan Dyck <sg...@standyck.com>.
If I'm not mistaken, the xcal effort has stalled because they seem to 
be moving in the direction of rdf. There is an rdf calendar task force 
announcement at:

http://www.ilrt.bris.ac.uk/discovery/2001/04/calendar/

You might want to consider monitoring this instead of using xcal.


On Mar 21, 2004, at 9:25 PM, John Lianoglou wrote:

>> That is my instinct as well.  Unfortunately, everything seems to use 
>> iCal
>> (mozilla, outlook, apple iCal) and from what I can find xcal seems to 
>> be stuck
>> between draft 2 (from 2002?) and draft 3 which may change things up
>> significantly if it is ever finished.
>
> Well, I feel like the xcal draft 2 features will be more than 
> sufficient for use in cocoon. Thought if there were a draft 3 actually 
> in active development, I'd naturally agree it's definitely worth 
> planning for.  :)

Stan Dyck

Note: I've sworn off sending email attachments. If you get an email 
from my address with an attachment, don't open it.


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


Re: Calendar Generator

Posted by Stan Dyck <sg...@standyck.com>.
If I'm not mistaken, the xcal effort has stalled because they seem to 
be moving in the direction of rdf. There is an rdf calendar task force 
announcement at:

http://www.ilrt.bris.ac.uk/discovery/2001/04/calendar/

You might want to consider monitoring this instead of using xcal.


On Mar 21, 2004, at 9:25 PM, John Lianoglou wrote:

>> That is my instinct as well.  Unfortunately, everything seems to use 
>> iCal
>> (mozilla, outlook, apple iCal) and from what I can find xcal seems to 
>> be stuck
>> between draft 2 (from 2002?) and draft 3 which may change things up
>> significantly if it is ever finished.
>
> Well, I feel like the xcal draft 2 features will be more than 
> sufficient for use in cocoon. Thought if there were a draft 3 actually 
> in active development, I'd naturally agree it's definitely worth 
> planning for.  :)

Stan Dyck

Note: I've sworn off sending email attachments. If you get an email 
from my address with an attachment, don't open it.


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


Re: Calendar Generator

Posted by Ugo Cei <u....@cbim.it>.
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.

Comments?

	Ugo


[1]: 
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/java/org/apache/cocoon/generation/CalendarGenerator.java


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


Re: Calendar Generator

Posted by Ugo Cei <u....@cbim.it>.
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.

Comments?

	Ugo


[1]: 
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/java/org/apache/cocoon/generation/CalendarGenerator.java


Re: Calendar Generator

Posted by Geoff Howard <co...@leverageweb.com>.
Alan wrote:

> * Geoff Howard <co...@leverageweb.com> [2004-03-23 12:27]:
> 
>>Alan wrote:
>>
>>
>>>   I asked this question. Now I'm back. :^)
>>>
>>>   Would the above simply generate a calendar without an iCal
>>>   source? My blog entries are not stored in iCal.
>>
>>Nope.  But in this case, you'd need to find a way to convert a list of your 
>>entries to whatever intermediate format and then take advantage of the rest 
>>of the bits of the puzzle being considered.
> 
> 
>     I think there is value to a generator that simply produces a
>     blank calendar, with dates grouped by month and week.
> 
>     How else would one do calendar based navigation?

I think this would be possible to initiate with an empty "intermediate format" 
document in the proposed scenario.  The point is one would generally want to 
start with a list of events (calendar entries) and "decorate" that with the 
calendar (date) data around it.  If you start with the caledar, you would 
probably have a clumsy or inefficient time getting the event data.

With made up xml in your case,

<cal:calendar start-date="03-01-2004" view="month">
</cal:calendar>

might result after the "decoration" step in what you want, something like:

<cal:calendar start-date="03-01-2004" view="month">
   <month name="March">
     <week number="1">
       <leading-days month="February">
	<day name="Sunday" date="29"/>
       </leading-days>
       <day name="Monday" date="1"/>
       <day name="Tuesday date="2"/>
       ...
     </week>
     ...
   </month>
</cal:calendar>

If you want to indicate where your blog entries actually are (by linking those 
dates, but not the others for example), it will be better/easier/more-resuable 
IHMO to start with a list of them, rather than start with the calendar and do it 
the other way around.  If you're in a hurry though, you may want to just do 
something that works for you.  I can't implement this kind of thing right now 
even though I'm interested in the discussion and it wouldn't be a long project 
after the details of the formats are worked out.

BTW, I have heard there was such a calendar "thing" in Cocoon 1.  Has anyone dug 
that up and looked at it?  <cant-resist>Of course it may be out of date 
now!<cant-resist>

Geoff

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


Re: Calendar Generator

Posted by Alan <al...@engrm.com>.
* Geoff Howard <co...@leverageweb.com> [2004-03-23 12:27]:
> Alan wrote:
> 
> >    I asked this question. Now I'm back. :^)
> >
> >    Would the above simply generate a calendar without an iCal
> >    source? My blog entries are not stored in iCal.
> 
> Nope.  But in this case, you'd need to find a way to convert a list of your 
> entries to whatever intermediate format and then take advantage of the rest 
> of the bits of the puzzle being considered.

    I think there is value to a generator that simply produces a
    blank calendar, with dates grouped by month and week.

    How else would one do calendar based navigation?

-- 
Alan / alan@engrm.com / http://engrm.com/
available for contract  -->  http://engrm.com/the-pitch.html

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


Re: Calendar Generator

Posted by Geoff Howard <co...@leverageweb.com>.
Alan wrote:

>     I asked this question. Now I'm back. :^)
> 
>     Would the above simply generate a calendar without an iCal
>     source? My blog entries are not stored in iCal.

Nope.  But in this case, you'd need to find a way to convert a list of your 
entries to whatever intermediate format and then take advantage of the rest of 
the bits of the puzzle being considered.

Geoff

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


Re: Calendar Generator

Posted by Alan <al...@engrm.com>.
* John Lianoglou <jo...@arachnedesign.net> [2004-03-22 05:25]:
> >>This will allow Cocoon to make extensive use of published iCalendar 
> >>files from, well, obviously wherever! :)
> >
> >That'd be great.  In fact, a sample providing a webav location for 
> >ical publishing and a few pipelines to view that data would probably 
> >be a big hit.
> 
> heh... sorta gives me goose bumps... er, hang on, what's that i missed 
> on today's shopping list ... "A Life" ... ehem, i see ...  ;)
> 
> 
> >One problem I see with the ical/xcal standard is that it's not 
> >designed to be a database - for example when selecting one week out of 
> >a calendar covering a year you may need to parse (and generate sax 
> >for) the whole thing though it would be otherwise unnessary.
> 
> well, i had already done some thinking on this one... but first it's 
> worth mentioning that any really huge files you feed into any 
> particular generator will logically cause a performance penalty of some 
> sort... so there's a degree of responsibility of the individual 
> managing the content to streamline this info.
> 
> that said...
> 
> perhaps the generator could filter out the important stuff using 
> attributes in the generator tag... i'm picturing something like:
> 
> Load whole ical into SAX stream:
> <map:generator type="calendar" src="blah.ics" />
> 
> Load date range:
> <map:generator type="calendar" src="blah.ics" from="2004-03-22" 
> to="2004-04-01" />
> 
> Load all information from a certain date, on:
> <map:generator type="calendar" src="blah.ics" from="2004-03-22" />
> 
> Load all information upto a certain date:
> <map:generator type="calendar" src="blah.ics" to="2004-04-01" />
> 
> Then you can implement special values for use in the from and to 
> attributes, like:
> 
> today
> today +/- 14

> month
> month +/- 6

> year
> year +/- 2

> where "today," "month," and "year" are always based on the current 
> date; and offsets can be specified by using + or - followed by an 
> integer.

    I asked this question. Now I'm back. :^)

    Would the above simply generate a calendar without an iCal
    source? My blog entries are not stored in iCal.

-- 
Alan / alan@engrm.com / http://engrm.com/
available for contract  -->  http://engrm.com/the-pitch.html

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


Re: Calendar Generator

Posted by John Lianoglou <jo...@arachnedesign.net>.
> That is my instinct as well.  Unfortunately, everything seems to use 
> iCal
> (mozilla, outlook, apple iCal) and from what I can find xcal seems to 
> be stuck
> between draft 2 (from 2002?) and draft 3 which may change things up
> significantly if it is ever finished.

Well, I feel like the xcal draft 2 features will be more than 
sufficient for use in cocoon. Thought if there were a draft 3 actually 
in active development, I'd naturally agree it's definitely worth 
planning for.  :)


> So, we are probably looking at
> 1) a generator to transform ical to some intermediate format (probably 
> xcal?) as you note below.  If someone happens to have native xcal 
> lying around, they could then just feed it right into the next steps.  
> By the same token, if someone has a custom non-ical format (i.e., 
> database, exchange server, etc.) they can stick some other generator 
> in here.
> 2) a transformer to take this format and decorate it with calendar 
> data (transforming to yet another intermediate) and
> 3) possibly a utility stylesheet for transforming this to a pretty 
> html format.  The last one would be generally application-specific, 
> but a well designed root stylesheet could go a long way toward 
> simplifying that process.

I would also suggest a serializer capable of producing iCalendar text 
files from an xCalendar SAX stream.


>> This will allow Cocoon to make extensive use of published iCalendar 
>> files from, well, obviously wherever! :)
>
> That'd be great.  In fact, a sample providing a webav location for 
> ical publishing and a few pipelines to view that data would probably 
> be a big hit.

heh... sorta gives me goose bumps... er, hang on, what's that i missed 
on today's shopping list ... "A Life" ... ehem, i see ...  ;)


> One problem I see with the ical/xcal standard is that it's not 
> designed to be a database - for example when selecting one week out of 
> a calendar covering a year you may need to parse (and generate sax 
> for) the whole thing though it would be otherwise unnessary.

well, i had already done some thinking on this one... but first it's 
worth mentioning that any really huge files you feed into any 
particular generator will logically cause a performance penalty of some 
sort... so there's a degree of responsibility of the individual 
managing the content to streamline this info.

that said...

perhaps the generator could filter out the important stuff using 
attributes in the generator tag... i'm picturing something like:

Load whole ical into SAX stream:
<map:generator type="calendar" src="blah.ics" />

Load date range:
<map:generator type="calendar" src="blah.ics" from="2004-03-22" 
to="2004-04-01" />

Load all information from a certain date, on:
<map:generator type="calendar" src="blah.ics" from="2004-03-22" />

Load all information upto a certain date:
<map:generator type="calendar" src="blah.ics" to="2004-04-01" />

Then you can implement special values for use in the from and to 
attributes, like:

today
today +/- 14

month
month +/- 6

year
year +/- 2

where "today," "month," and "year" are always based on the current 
date; and offsets can be specified by using + or - followed by an 
integer.

but maybe that's a can of worms ... ;-)



jL

John Lianoglou | Vice President | ARACHNEdesign
http://www.arachnedesign.net


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


Re: Calendar Generator

Posted by Geoff Howard <co...@leverageweb.com>.
John Lianoglou wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> MAN, I have been meaning to get around to this for the longest!
> 
> It seems to me that one would want to stand on the shoulders of giants; 
> I would suggest that a Calendar Generator leverage the efforts of the 
> IETF iCal / xCal working group.

That is my instinct as well.  Unfortunately, everything seems to use iCal
(mozilla, outlook, apple iCal) and from what I can find xcal seems to be stuck
between draft 2 (from 2002?) and draft 3 which may change things up
significantly if it is ever finished.  These are just conclusions from browsing 
the ietf-calendar and xcal-dev archives, so please correct me if anyone has a 
better pulse on where things are really at.  (see thread at 
http://www.imc.org/ietf-calendar/mail-archive/msg11885.html)

So, we are probably looking at
1) a generator to transform ical to some intermediate format (probably xcal?) as 
you note below.  If someone happens to have native xcal lying around, they could 
then just feed it right into the next steps.  By the same token, if someone has 
a custom non-ical format (i.e., database, exchange server, etc.) they can stick 
some other generator in here.
2) a transformer to take this format and decorate it with calendar data 
(transforming to yet another intermediate) and
3) possibly a utility stylesheet for transforming this to a pretty html format. 
  The last one would be generally application-specific, but a well designed root 
stylesheet could go a long way toward simplifying that process.

> This will allow Cocoon to make extensive use of published iCalendar 
> files from, well, obviously wherever! :)

That'd be great.  In fact, a sample providing a webav location for ical 
publishing and a few pipelines to view that data would probably be a big hit.

> This is admittedly an idea very informed by the circumstances that 
> raised the idea for myself, but I imagined such a generator to read an 
> icalender file and make a SAX stream as xcalendar format (which the 
> working group has already fleshed out and published for us)!

What works for you will probably work for others unless you have oddball 
requirements - so that's not a bad thing.  One problem I see with the ical/xcal 
standard is that it's not designed to be a database - for example when selecting 
one week out of a calendar covering a year you may need to parse (and generate 
sax for) the whole thing though it would be otherwise unnessary.

Geoff


> 
> Here are some links:
> 
> http://www.calsch.org/
> 
> http://www.calsch.org/ietf/archives/rfc2445.txt
> http://www.calsch.org/ietf/archives/draft-ietf-calsch-many-xcal-02.txt
> 
> 
> 
> jL
> 
> 
> 
> John Lianoglou | Vice President | ARACHNEdesign
> http://www.arachnedesign.net
> 
> 
> On Mar 20, 2004, at 6:40 PM, Geoff Howard wrote:
> 
>> Alan wrote:
>>
>>>     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
>>




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


Re: Calendar Generator

Posted by John Lianoglou <jo...@arachnedesign.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

MAN, I have been meaning to get around to this for the longest!

It seems to me that one would want to stand on the shoulders of giants; 
I would suggest that a Calendar Generator leverage the efforts of the 
IETF iCal / xCal working group.

This will allow Cocoon to make extensive use of published iCalendar 
files from, well, obviously wherever! :)

This is admittedly an idea very informed by the circumstances that 
raised the idea for myself, but I imagined such a generator to read an 
icalender file and make a SAX stream as xcalendar format (which the 
working group has already fleshed out and published for us)!

Here are some links:

http://www.calsch.org/

http://www.calsch.org/ietf/archives/rfc2445.txt
http://www.calsch.org/ietf/archives/draft-ietf-calsch-many-xcal-02.txt



jL



John Lianoglou | Vice President | ARACHNEdesign
http://www.arachnedesign.net


On Mar 20, 2004, at 6:40 PM, Geoff Howard wrote:

> Alan wrote:
>
>>     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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFAXV8Z2mjmCyerauURArVDAKCupMa74x1mblg5T89zMneBVKf1WACg1eAG
J5IH9SEBx7I7iQTpxH+4Dcw=
=piui
-----END PGP SIGNATURE-----


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


Re: [RT] Re: Calendar Generator

Posted by Geoff Howard <co...@leverageweb.com>.
Ryan Hoegg wrote:
> Geoff Howard wrote:
> 
>> Alan wrote:
>>
>>>     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
>>
> 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 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.

I think parts of this problem fit each mindset.

> 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 :)

See my response in the other part of this thread - what do you think of going 
xcal for step one?  I'll have to comment on the below later, but I think it's 
the job of the transformer (step two in my other email) to fill in information 
related to dates, day names, etc.  and the following xsl just to translate to 
html/whatever display.  I don't want to have to figure out whether the current 
february has 28 or 29 days in xsl for example.

Geoff

> 
> [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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 
> 


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


Re: [RT] Re: Calendar Generator

Posted by Ryan Hoegg <rh...@isisnetworks.net>.
Ryan Hoegg wrote:

<snip/>

> ... 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)

Hey, just found a third: 
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=cocoon-dev@xml.apache.org&msgId=614482

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


[RT] Re: Calendar Generator

Posted by Ryan Hoegg <rh...@isisnetworks.net>.
Geoff Howard wrote:

> Alan wrote:
>
>>     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
>
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 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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Calendar Generator

Posted by Geoff Howard <co...@leverageweb.com>.
Alan wrote:

>     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

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