Using RSS for House Committee Schedule Feeds
Based on John Wonderlich’s work on the Open House Project and Joshua Ruihley’s work on Open Hearings, we here in the Labs decided to write a ‘dream feed’ as an example of an RSS format congress could use to syndicate their committee meeting schedule.
<?xml version="1.0"?> <rss version="2.0" xmlns:xcal="urn:ietf:params:xml:ns:xcal" xmlns:enc="http://www.solitude.dk/syndication/enclosures/"> <channel> <title>House Committee Schedule</title> <link>http://house.gov/schedule/</link> <description>Master schedule for house committees.</description> <language>en-us</language> <lastBuildDate>Fri, 06 Jul 2007 09:39:21 EDT</lastBuildDate> <docs>http://www.rssboard.org/rss-2-0-9</docs> <generator>House Schedule Generator 1.0</generator> <webMaster>firstname.lastname@example.org</webMaster> <ttl>3600</ttl> <item> <title>Subcommittee on General Farm Commodities and Risk Management</title> <link>http://agriculture.house.gov/hearings/schedule.html</link> <description>To review trading of energy-based derivatives.</description> <pubDate>Fri, 06 Jul 2007 09:39:21 EDT</pubDate> <guid>http://agriculture.house.gov/hearings#200707121000</guid> <category domain="http://house.gov/schedule/type">hearing</category> <category domain="http://house.gov/schedule/visibility">public</category> <xcal:organizer cn="House Committee on Agriculture">http://agriculture.house.gov</xcal:organizer> <xcal:location>1300 Longworth House Office Building, Washington, DC</xcal:location> <xcal:dtstart>2007-07-12T10:00:00Z</xcal:dtstart> <xcal:dtend>2007-07-12T11:00:00Z</xcal:dtend> <xcal:attendee role="CHAIRMAN" cn="Rep. John Doe">mailto:email@example.com</xcal:attendee> <xcal:attendee role="OPT-PARTICIPANT" cn="Rep. Joe Smith">mailto:firstname.lastname@example.org</xcal:attendee> <xcal:attendee role="X-WITNESS" cn="Dan Johnson">mailto:email@example.com</xcal:attendee> <enc:enclosure title="Live Media"> <enc:link type="video/quicktime" length="11534336" url="http://agriculture.house.gov/hearings/200707121000.mov" /> <enc:link type="audio/mpeg" length="11534336" url="http://agriculture.house.gov/hearings/200707121000.mp3" /> </enc:enclosure> <enc:enclosure title="Archived Media"> <enc:link type="video/quicktime" length="11534336" url="http://agriculture.house.gov/hearings/archive/200707121000.mov" /> <enc:link type="audio/mpeg" length="11534336" url="http://agriculture.house.gov/hearings/archive/200707121000.mp3" /> </enc:enclosure> <enc:enclosure title="Agenda"> <enc:link type="application/pdf" length="11534" url="http://agriculture.house.gov/hearings/200707121000_agenda.pdf" /> </enc:enclosure> </item> </channel> </rss>
The feed was written to the RSS 2.0.9 spec. Since RSS is meant for syndication, two additional modules, elements belonging to a namespace, were used to add the information that was needed. The xCal XML specification was used to add event data to the feed. xCal is an XML representation of the widely used iCalendar format. The format is fairly straighforward except for the organizer and attendee elements. The specification requires the value of these elements to be a URI rather than a string naming the individual. The URI can be any identifier, but is typically the email address of the individual. To include the name of the individual, a cn attribute must be added to the tag. The attendee element has a role attribute that describes the role in which the attendee will be serving. We’ve added a custom X-WITNESS role to identify witnesses that are testifying before a committee.
Additionally, we have a need to add multiple enclosures to the feed to represent different types of media: audio and video of events and documents related to the event. Since the RSS 2.0.9 spec is a bit unclear as to whether multiple enclosures are supported we decided to use Andreas Pedersen’s multiple enclosure extension. It’s fairly straightforward and allows us to link to multiple types of related documents and media.
Your feedback is welcome and desired! We’d like to make this sample feed as good as it can be to serve as an example of the Right Way to syndicate congressional schedules so any fixes or additions are quite appreciated. We’ll post all changes to the blog.