[Catalyst] Can Catalyst-Plugin-AtomServer support nontext/xhtml content?

A. Pagaltzis pagaltzis at gmx.de
Mon Sep 25 19:22:34 CEST 2006

* John Napiorkowski <jjn1056 at yahoo.com> [2006-09-25 19:00]:
> Perhaps I don't fully understand how this works, but my current
> understanding is that ATOM allows you to specify xml inside the
> content tags as long as you set a type attribute of something
> with 'xml' in it, like "application/xml" for example.

The rules for XML MIME types are more restrictive than that, but
otherwise this is correct.

> Now the atom spec says I can do XML content and have it look
> like (same example as above):
> <content type="application/xml">
>   <member xmlns="http://mysite.com/ns#member" >
>     <name>blah blah</name>
>     <title>nobody</title>
>   </member>
> </content>


> However nothing I do seems to get the XML::Atom plugin to work
> this way. Now, I realize this is not a tradional use for this
> kind of feed, but the specification seems to indicate it's a
> valid one.

It’s not just valid, it’s explicitly catered for. This was one of
the use cases that was considered when “we” first drafted Atom
(quote marks because I was not on the WG at the time) and
remained a central concern throughout the process. Atom is not
just for weblog delivery; think of it more as a webservice
messaging wire format. It can do a lot of things besides weblogs.

Check this out: http://www.codezoo.com/about/doap_over_atom.csp

> Another approach I could take is how Google is doing this by
> adding a new namespace and placing the data elements inside the
> entry tag and not the content tag. Maybe this is a better way?
> This would look (very roughly like)
> <entry member:xmlsn="http://mysite.com/ns#member">
>     <member:name>blah blah</name>
>     <member:title>nobody</title>
> </entry>

Please don’t. Atom is not RSS2. Most of the interesting things
one might want to do can be done with the provisions of the core
format, without any need for lots of underspecified and badly
interacting extensions that contribute to the mess in RSS2-land,
each requiring a special-case implementation.

See also http://www.snellspace.com/wp/?p=314 for a critique of

> It just seems neater to me to place all my stuff inside the
> content tag,

It *is* neater. It is the intended purpose of `content`.

PS.: if you are putting non-human-readable stuff there, then see
if you can provide a human-readable (possibly short) description
in `summary`. (Think of `summary` as being to `content` what
HTML’s `img`’s `alt` attribute is to `src`.)

Aristotle Pagaltzis // <http://plasmasturm.org/>

More information about the Catalyst mailing list