Thursday, September 26, 2002
RSS 2.0 template for Movable Type, ready to copy and paste over your existing RSS 0.91 template (
index.xml). No modifications are required, unless your weblog is in a language other than English, in which case you’ll need to change the
dc:language tag to your language code. (Use the 2-letter language code, unless there isn’t one for your language, in which case, use the 3-letter language code. And while you’re at it, put the same language code in your
HTML tag in your normal page templates. But I digress.)
There are several design decisions at work in this template that bear explaining. First of all, this template is designed to be backward-compatible with all existing aggregators, news readers, and RSS parsers, ranging from the super-smart XML parser built into .NET to the dumb, minimal, regular-expression-based parser that your downstairs neighbor banged out on a Friday night. If you upgrade your existing
index.xml right now, none of these parsers should crash, and none of your subscribers should scream bloody murder. This is a good thing.
Now then, if you look at the template, you’ll notice a whole slew of lines at the top like
xmlns:dc="...". These are namespaces. Keven Hemenway has written an excellent primer on extending RSS 2.0 with namespaces, so I won’t explain them here except to say that we use them, and you should get used to seeing them. Most RSS 2.0 documents you see will use namespaces in some way, because they are the primary way of adding functionality beyond the basic title-link-description combination. If all you want is title-link-description, stick with your existing RSS 0.91 template and stop reading now.
Still here? OK. Now, the RSS 2.0 specification says nothing about how to actually use namespaces in RSS, just that you’re allowed to. So where did these particular namespaces come from? Well, I didn’t make them up. They have been developed over the past two years by some smart people, most of whom hang out on the RSS-DEV mailing list. The namespaces were originally developed for RSS 1.0, and most of them can be used without modification in RSS 2.0. (There’s a lot of stuff I’m skipping over here on purpose. There will be a lot more documentation forthcoming in the next few months on exactly how to use various namespaces in RSS 2.0. Some of it still needs to be worked out, but most of it just needs to be written down. Please be patient.)
So anyway, we use namespaces for a lot of stuff. Most stuff, in fact. In the template, you’ll see title-link-description for
channel, and title-link-description-guid for
guid is new in RSS 2.0, and it is used to uniquely identify an item, so even if the title or description changes, aggregators know that it’s the same item; the end user can choose whether to re-display changed items, but first programs need to be able to track which items are which. (Radio Userland already supports this.) To create the
guid, I’ve combined
MTBlogURL to generate a unique string for each item, and I’ve arranged them so there’s no confusion about it possibly being a URL. It’s not a URL; it’s just a unique string. (Other systems have stricter format requirements for guids, but RSS 2.0 does not. A guid is a unique string, and that’s all.)
Pretty much everything beyond title-link-description (and guid) uses namespaces. This template makes use of all 3 of the standard RSS 1.0 namespaces, but there are many other proposed namespaces that have a lot of good design behind them. We use one (
admin), which is already widely used; the rest may be useful to you, depending on your niche. (If you think you need to design your own namespace, look through that list and make sure you’re not re-inventing the wheel.)
Back to the template. Other than guid, the most important thing to note about this template is that the
description are all plain text. (
description is an excerpt; if you do not enter an excerpt manually for a post, Movable Type will auto-generate one. You can control how long this auto-generated excerpt is by going to Blog Config, then Preferences, then “Number of words in excerpt”.)
title was always supposed to be plain text, but sticking to plain text in the
description tag is an intentional compromise, to support parsers that can not handle HTML, or handle it improperly. Never fear, the full HTML text of your post is still included; it’s stored in the
content:encoded element. (Aggie already supports this.) This allows more robust news readers—that can handle either text or HTML—to offer the end user the choice of whether to see excerpts or full posts. Some people use news aggregators to find things to read, others like reading everything directly in their aggregator. RSS 0.9x made you (the author) choose one or the other; RSS 2.0 allows you to offer both, and pass the choice along to the end user. This is a good thing.
There’s more good stuff in there, but the explanations will have to wait for another day. If you’re interested in learning how to extend RSS to suit your needs, your best bet is to read through the documentation of the existing RSS 1.0 namespaces. If you have questions, your best bet is the RSS-DEV mailing list, where Kevin is currently discussing his namespace primer. Archives are public and free, so no subscription is required, and lurking is encouraged.
And watch this space.
Wednesday, September 25, 2002
Morten Frederiksen has taken a first stab at a real-time social network explorer based on FOAF files. You could start on my profile and explore from there, or enter the URL of your own FOAF file (at the bottom of the page). It’s heavy on tech details, but you can easily see the potential here. (It’s also a great way to debug your FOAF file, if you added anything manually.) Now we need somebody to build a spider that follows
foaf:knows links and draws pretty social network diagrams, so we can see the forest for the trees.
Mark Tosczak: A New Way to Read, Not See, Maps. “The map-navigation software, dubbed Blind Audio Tactile Mapping System ... takes digital map information and provides nonvisual feedback as a user moves a cursor across the map.”
Paul Ford: Falling Off a Truck. “In the last 4 days I fell off a truck and was dragged for 30 feet, and was interviewed by an NPR show. Those two facts are not related except that they both happened to me and made me queasy. I also wrote a short plan outlining the rest of my life.”
Anil Dash: XML version 1.0. “Why isn’t there a way to syndicate my words without butchering the way they look?” Several people protested last week by changing their weblog templates to something like this. Jason Levine has more links to those involved. I spoke with one of the people who implemented it, and she claims it wasn’t a protest as such, more of an inside joke. Point taken: the entire point of an aggregator (and syndication in general) is to make everyone’s words look the same. Counterpoint: the default in most weblog systems is to only publish excerpts in RSS feeds; nobody’s forcing you to publish full posts. This would probably be a good place to insert a Zen quote about attachment, but my mind is too fuzzy to find it.
Nicholas Avenell: ESF. “Are you also fed up with the continuing war between RSS 0.9* and 1.0 and 2.0 and whatever else they invent today? Me too. So today I invented the Epistula Syndication Format. ESF. It isn’t XML. It isn’t RDF. It’s just data.” Sam would love it, then. But Movable Type doesn’t support outputting dates in Unix timestamp format, which could be an impediment to mainstream acceptance.
Shelley Powers: Consumer Rights and RSS. “I’m not buying into RSS 0.9x. I’m not buying into RSS 2.0. I’m not buying into RSS 1.0. I changed my RSS 0.91 and RSS 1.0 templates to read the following:”
RSS not supported here
This weblog does not support RSS 0.9x, RSS 2.0, or RSS 1.0. If you wish to view entries, may I suggest that you visit the weblog, and save your fast skimming for the New York Times and Wall Street Journal.
I’m sure this is some sort of DMCA violation or something, but here goes:
import urllib, re; print "<rss><channel>\n <title>Burningbird</title>\n <link>http://weblog.burningbird.net/</link>\n <language>en-us</language>\n </channel>\n" + "\n".join(["<item><title>%s</title><link>%s</link></item>" % t for t in re.compile(r'dc:title="(.*?)"\s*dc:identifier="(.*?)"', re.DOTALL).findall(urllib.urlopen('http://weblog.burningbird.net/').read())]) + "</rss>"
Tuesday, September 24, 2002
Sam Ruby: Stark raving mad.
This post was entered in Radio, extracted using a batch file via some UserTalk, parsed using Perl, cleaned up by tidy and a C program of my own design, transferred to intertwingly using scp, and then ssh triggers unpacking on the destination site, where a shell script takes over: invokes indexing using Jakarta’s Lucene, and then a python script pings weblogs.com and blo.gs.
Tom Stoppard (Rosencrantz and Guildenstern are Dead):
Guildenstern: “A man talking sense to himself is no madder than a man talking nonsense not to himself.”
Rosencrantz: “Or just as mad.”
Guildenstern: “Or just as mad.”
Rosencrantz: “And he does both.”
Guildenstern: “So there you are.”
Rosencrantz: “Stark raving sane.”
Jeffrey Zeldman: OS X Blues update.
A couple of intellectuals have pointed out parallels between the rigidity of OS X, which derives its power from Unix and XML, and the rules of standards-based web development, which also compels you to do things the right way instead of using five different non-standard hacks. The parallel is not without merit. Building web pages the right way is hard at first, but once you get it, you never want to go back. Regardless, we miss OS 9’s flexibility and ease of use, and a metric ton of logic doesn’t offset that feeling of loss.
DVD Capture 1.0 “is a helper application for the Apple DVD Player. It enables the user to take screen captures of the DVD Player Viewer in window and full screen mode. The captures can be saved to a file or placed on the clipboard.”
- Phil Ringnalda: Putting on the brakes. “So, the answer to the question that started this whole project, "what is the RDF in RSS 1.0 good for?" is two things: it’s good for someone who has an infinitely large database that can be queried infinitely fast by a schema-aware program, or it’s good for writing a schema-aware aggregator that can try to figure out what it should do with new elements that it hasn’t seen before. That’s actually an interesting project with some potential for success, but at this point I’m sick of the whole thing, so I’ll leave that project for someone else.”
- Aaron Swartz: TRAMP: Makes RDF look like Python data structures. “RDF/XML got you down? Tired of having to go through contortions to deal with data? Want to write Python and be standards-compatible at the same time? Need a module to implement the psuedo-code you had on your slides? TRAMP may or may not be the answer to these problems!” Complete with an example of parsing FOAF files.
- Dan Connolly: HyperRDF: Using XHTML Authoring Tools with XSLT to produce RDF schemas. “XML syntax is a little tedious, but lots of people are evidently willing and able of editing it by hand. RDF adds another layer of tedium, but there are still a few folks willing to write it by hand. I make heavy use of reification/quoting in my representation of logical formulas in RDF. This adds another layer of tedium that I find unmanageable, and I have been writing XML/SGML/HTML by hand for 10 years.” Also includes a cogent explanation of the obscure
profileattribute in HTML.
Monday, September 23, 2002
Shelley Powers: “I thought the stuff this weekend on FOAF was a joke—a bunch of people playing with new toys. ... How does FOAF aid aggregation? The author is included with each bit. Why do we need extraneous material such as college, and who the author knows?”
Seth Russell: “For example I wanted to know who you were. Only thing I had was your posts to this list. So i found "burningbird.net" in your email address ... then i did a lot of reading over there. Still don’t really know who your are and what you are into, what projects you are working on, who you know, and why you came here to run your mouth. But if there were a foaf button on the feed from this channel, well I just click on that and i’m totally into your stuff.”
Trust me when I tell you that heavy medication and RDF do not mix. Here is a list of things I intend to re-read once the fog lifts:
- Phil Ringnalda: Using FOAF relationships and Just say no to Trackback in
- Les Orchard: Per-post comment RSS feed.
- Phil Wainewright: The bare necessities of RSS and What to do about RDF. The beginning of an RSS 2.0 best practices document.
- Jonathon Delacour: Trying to score a goal. “As the best and the brightest focus on the possibilities of FOAF, I turned my attention to yesterday’s news: RSS.” No, RSS will always be today’s news. Get it? Today’s newzzz... Never mind.
- Comments on Ben Hammersley’s Friend of a Friend. Various ways to link to a FOAF file from an RSS feed.
- Nicholas Chase: The Web’s future: XHTML 2.0. We’re losing backward compatibility, isn’t that great? Well, he seems to think so.
- mod_cc, a module for including copyright information in RDF documents such as RSS 1.0 feeds, and, I hope, FOAF files.
- Shelley Powers: Who is your audience, and what are you trying to accomplish? Addressing the growing identity crisis on the RSS-DEV mailing list. Also the comments on Shelley’s article.
- Ian Hickson: Pingback 1.0. “The best thing about this idea is that unlike similar schemes like TrackBack, it is totally transparent to both users.”
- New software helps in building of accessible web sites. A press release for a new edition of LIFT, which I have never used.
- Forget Mars bars, Twinkies now the deep-fried treat. “The secret to making a deep-fried Twinkie, he says, is to place it in the fridge first to give it more stability. He then rolls it in flour, covers it with batter ... and plunks it into the oil.”
No, really. My sinus infection, which appeared to be gone, flared up again over the weekend in the nastiest way, and I am now coughing up dark mucus and doing other things that probably don’t bear repeating in a public forum. I have the 10:15 doctor’s appointment that I should have made last round, had I not convinced myself that “it’s not that bad” and trudged through it all without prescription drugs. I’m not making the same mistake this time. I’ll be back this afternoon.
My email problems of yesterday have been resolved. You can once again reach me at my normal address, email@example.com.
Kevin Burton emailed me with another way to link to a FOAF file from my RSS feed. It looks easier than previous suggestions, and it has the advantage of being able to use it from an RSS 1.0 or 2.0 feed, but I worry about all these variations. Just as in real life, where people can use different words that mean essentially the same thing, in the Semantic Web programs can use different vocabularies to express the same statements. That’s great for producers, not so great for consumers who have to make sense of it all.
For each domain (RSS feeds, FOAF files, whatever), somebody (or some group) needs to come along and document best practices. We need better goal-oriented documentation. We have a lot of reference documentation, task-oriented documentation, but very little that documents that larger picture and answers questions written in English. “How do I include personal information in my RSS feed?” is a goal-oriented question. “Create a FOAF file using this tool and then insert this line at this location in your RSS feed” (with as many examples as necessary) is a goal-oriented answer. Anything less is like trying to master a foreign language by reading a dictionary.
Sunday, September 22, 2002
Ben Hammersley: FOAF to vCard. “It’s so alpha as to be almost pitiful, but this widget may well give you a vCard file from a FOAF file. You can then import the vCard into Outlook, OSX AddressBook and any other vCard compatible app.”
Meanwhile, Merlin Mann, in email, states “Most folks' eyes (understandably) glaze over when I start rhapsodizing about RSS self-discovery and Amazon APIs. But it’s pretty cool if you say, "People who visit your home page can instantly know you went to college together and now live in the same town." That’s transparently pretty neat.”
To that end, I’ve put some more information into my FOAF profile, including
foaf:schoolHomepage (Earlham), and
foaf:currentProject for information about my current projects (Dive Into Python, Dive Into OS X, Dive Into Accessibility). I’d like to use the Creative Commons framework to specify the copyright information for each of these projects, but I can’t quite figure out how to specify that a project is governed by the GNU Free Documentation License. Let’s see, who’s the guru with this stuff? Aaron, I think. Must ask Aaron.
Timothy Appnel: More FFKAR, RDF, and FOAF.
Merlin Mann’s FOAF. Merlin calls it a FOAF Bandwagon, which probably overstates the case somewhat. ;-) As for the possibilities of what we could build if we all had FOAF files: “Imagine international, real-time popularity contests. It’d be like middle school with 4 billion people.” We already have that; it’s called Google.
Hmm, on second thought, maybe it is a bandwagon. We already have the inevitable backlash. “Spammers might not even give two cents about what your interests are, but they will care about a vast free network of email-addresses and URLs. Even if the email-address is encoded (it is), it’s only a slight disturbance to the Darth Vaders of marketing if you share what URL to scan for email-addresses.” Um, no. Spammers are not discriminating enough to care about “webs of trust”, and they already have lots of non-Semantic-Web ways of finding email addresses. And more sophisticated direct marketers are much too sophisticated to trust self-reported data.
Over at Ben Hammersley’s pad, we’re discussing how to link FOAF and RSS in both directions (pointing to your RSS feed from your FOAF file, and pointing to your FOAF file from your RSS feed), plus how to link FOAF and HTML (ala RSS autodiscovery). A couple of ideas in all directions, although for linking from RSS to FOAF, I would prefer a simple syntax that is valid RDF but would also work in an RSS 2.0 feed. Then I want a FOAF-aware RSS aggregator that gives me a right-click “about the author” option that shows me their FOAF data and all the people they know—and then offers to subscribe to their RSS feeds. I get all intertwingly just thinking about it.
Meanwhile, over at Phil Ringnalda’s pad, we’re discussing how to list your enemies in a FOAF file, using Eric Vitiello’s FOAF relationship module. The syntax seems simple enough (replace
rel:enemyOf), but it raises interesting questions about adding too much complexity for implementors, leaving it up to the developer of the consuming application to understand the semantic relationships between all of these related vocabularies. I’m pretty sure I’m still missing several pieces of this puzzle.
I am having email issues. Please use firstname.lastname@example.org if you want to reach me today.
- More FOAF links. Edd Dumbill’s excellent introduction to FOAF; FOAFboat; RDFWeb-dev mailing list. (73 words)
- Still good?. Overheard while cleaning out the refrigerator: "Is this fondue still good? It’s from Valentine’s Day." (42 words)
- RDF library for Python. RDFLib is a Python package which can read and write RDF files, including FOAF files. (75 words)
- Friend of a friend. I’ll be scrounging around for FOAF files today. If you have a FOAF file (or this post inspires you to make a FOAF file, using the FOAF-a-matic), please email me at email@example.com so I can add you to my FOAF profile. (450 words)
- Good question. Bill Kearney: "What’s so bad about RSS 1.0?" (89 words)
- Introduction to the Semantic Web. Kevin Hemenway: The Semantic Web 1-2-3. "This document is not intended to teach you RDF via my own words, but rather to hand-hold you through the "good" parts of the same journey I took. If it looks like a big link-list with menial comments from the peanut gallery, then you’re not far off the mark." (58 words)
- Kittens and my middle finger. D has just informed me that there is a kitten available for adoption in her office. (58 words)
- Aggregator survey. According to my own statistics, 771 readers have used identifiable news aggregators to read my site in the past few days. Here’s how it breaks down. (118 words)
- Think. MacDesktops.com: Think Furry. (6 words)
- Elementary. The Register: "Want to know how RIAA.org was hacked?" (17 words)
- Stumbled. Michael Barrish: "So I stumbled on some photos on the Internet of my ex-girlfriend having sex. This was on a porn site. I visit porn sites." (30 words)
- RSS for comments. Thoughts on subscribing to comment threads via RSS. (124 words)
- Weblogger.com = WeBully.com. Dave Johnson is being harassed by Weblogger.com, a for-profit hosting site, for naming his open source product "Roller Weblogger". (303 words)
- Fuck The Onion. I have removed my link to an article on The Onion in compliance with their (non-)linking policy. (35 words)
- Satires. BBSpot: "Ford testifies to stop ride sharing". SatireWire: "Hackers beg boring people to stop encrypting email". (61 words)