This is a preliminary note and subject to change. Please e-mail me before implementing anything with it. Thanks!
Further Note: I'm looking at ways to use RFC 2445 to do this.
For most sorts of data there's an economic reason to not publish XML. No company wants to compete on price, a century of graphic design theory (as implemented quite often in web pages) argues against making product information easily accessible.
But there's one place where people do have an incentive to give the data in its raw form: calendars and schedules. There's also a real need for this information, I don't remember to check all of the calendars for all of the groups that might have interesting events, but if it all happened in a single web page or application I probably would.
So to that end I present a proposal for XML encoding of calendars of events.
This is a first draft, and I'm looking for two things:
First is that I undoubtedly structured some of this data wrong or left out necessary information.
But second, and more important, is that I don't have a background in the XML community. I don't have a feel for the right naming conventions, when to put things in attributes (current attitudes seem to be "never"), stuff like that. It is this that I'm looking for most of my feedback on.
Anyway, if I can get some feedback we'll get some data scrapers implemented so we've got sources and throw together some applications which use this data.
In an an article on the scripting news discussion forum , Fim Flanagan asked about recurring events ("First Tuesday of the month", etc).
I see too many exceptions. I think that the right way to deal with this to have a set of reference scripts which generate recurring calendars. Even with fairly consistent get-togethers there are still changes with speaker information.
If you need to generate a bunch of such dates quickly, a simple Perl subroutine to do so:
use Date::Calc qw(Nth_Weekday_of_Month_Year); sub RecurringDate($$$$) { my ($startTime, $ordDay, $dow, $count) = @_; my ($month, $year) = (localtime($startTime))[4,5]; $year += 1900; my ($i, @ret); for ($i = 0; $i < $count; $i++) { my ($y,$m,$d) = Nth_Weekday_of_Month_Year($year + int(($month + $i) / 12), ($month + $i) % 12 + 1, $dow, $ordDay); push @ret, sprintf("%4.4d-%2.2d-%2.2d", $y,$m,$d); } return @ret; }
Saturday, December 18th, 1999 danlyke@flutterby.com