Atom 0.3 is out. Mark Nottingham wrote the Atom 0.3 spec. I wrote a Movable Type template. Rael Dornfest wrote a Blosxom plugin. I am now publishing a live Atom feed with both excerpts and full content.

Here are the main changes from 0.2:

  1. Expanded link syntax. All links now include rel, type, and href attributes. Here’s a before and after comparison to get you started with basic (required) linking. I’ll explain the more advanced (optional) linking types next week.
  2. Expanded content model. feed/title, feed/tagline, feed/info, feed/copyright, entry/title, and entry/summary may now contain arbitrary data (such as HTML). As with the content element, you must specify the MIME type in the type attribute, and (for non-XML formats) the escaping mode in the mode attribute.
  3. xml:base support. Relative links in content are relative to the address specified in xml:base. (more on xml:base).
  4. New feed/info element, based on Jason Shellen’s proposal.
  5. feed/generator syntax has changed. It now has optional url and version attributes, and the element text is now the human-readable toolkit name.

Here are some example Atom 0.3 feeds:

I’ve updated the Feed Validator to validate Atom 0.3 feeds. You can download the validator source code if you like; we added about 300 test cases in this release. The Feed Validator no longer supports previous versions of Atom, so go upgrade your feed and then validate it!

The MIME type for Atom feeds will be application/atom+xml. Joe Gregorio explains how to serve your Atom feed with the proper MIME type, and why you should.

Now that we have a MIME type, we can talk about Atom feed autodiscovery. In the <head> section of your home page, you should point to your Atom feed with a <link> tag.

For HTML 4 websites (like mine), it looks like this:

<link rel="alternate" type="application/atom+xml" title="Atom" href="http://url/of/your/atom/feed">

For XHTML websites (like most Movable Type sites), it looks like this:

<link rel="alternate" type="application/atom+xml" title="Atom" href="http://url/of/your/atom/feed" />

The title attribute is optional, and may be omitted. rel, type, and href are required, and may appear in any order. The HTML specification says that the values of rel and type are case-insensitive, so clients should be able to handle rel="alternate", rel="Alternate", and rel="ALTERNATE" the same way (and ditto for type). href may be a relative URL, in which case it’s relative to the page where the <link> tag appears. (This is the same way all other <link> tags work, such as those that point to external CSS stylesheets.) I’m going to write this up in a formal spec soon; this is just to get you started.

I’m using the Atom autodiscovery <link> tag on my home page right now, so you can use that as an example. When developers update their applications to support Atom 0.3, they should support Atom autodiscovery too. The Feed Validator supports it, so if you type diveintomark.org into the validator, it will find my Atom feed and validate it.

§

Eleven comments here (latest comments)

  1. Don't Back Down (trackback)
  2. anil dash's daily links (trackback)
  3. Vertical Hold (trackback)
  4. Ross Notes (trackback)
  5. Switch-Case (trackback)
  6. Weblog Hype (trackback)
  7. Dichotomy's Purgatory (trackback)
  8. The Law of Averages (trackback)
  9. zonble's @rsenal. (trackback)
  10. e i g h t - c u b e d . c o m (trackback)
  11. Cantoni.org (trackback)

Respond privately

I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)



§

firehosecodeplanet

© 2001–present Mark Pilgrim