Enclosures in Atom?

Atom… I’m clueless as to how enclosures are handled…

Being someone who has not followed Atom as much as the next super-geek, I’m clueless as to how enclosures are handled… I mean, I could have sworn someone was just namespacing in RSS 2.0 and using the <enclosure> element, but I find no docs on that… (And since Mark ain’t around to help with this…)

I guess there are “Atom enclosures” in the 0.8 draft

Should I be using this?

   src="" />

Or perhaps this?

   href="" />

I think they both pass the validator fine, but that doesn’t tell me what I should really be using or doing.

Searching gave no good results, and IM to smart people gave no solid answers… Argh… (Maybe in another 10 months I’ll have an answer.)

Oh yeah, it looks like the WordPress solution was to just use a function named rss_enclosure in the wp-atom.php file, which as you might guess, does the RSS 2.0 thing with <enclosure> in an Atom 0.3 file. I think I’d call that a bug

Update: My (test) Atom 0.3 Feed with Enclosures.

4 replies on “Enclosures in Atom?”

I haven’t been paying as much attention to enclosures as other parts, but I’d say “Maybe” and “No.”

The first one would be correct and reasonable for remote content: you might have a summary and a title, but you have no content other than the MP3. For the second, you want rel="enclosure".

Ah, 0.3 rather than 0.9+. The transition’s going to be interesting, isn’t it?

I’d mention that someone really ought to be writing a transition guide, if it wasn’t for the little pitchers with big ears and a fondness for assigning tasks to whoever brings them up.

Comments are closed.