Richard Salz wrote:
Happy New Year.

I want to add content to an atom:entry, but it's intended for use by computers not humans. I know atom:content can hold arbitrary XML, but I'm not sure if I should use that or if I should put it as a direct child of the atom:entry element.

I don't like usurping the "human-readable" intent of atom:content. Also, since it's Language-Sensitive, I have a slight concern about someone translating machine field names and the like. There's a (slight) chance that the content could from different components, which is why I prefer inserting elements into atom:entry instead of "rewriting" atom:content. I don't have any justficiation for that other than "gut feel" however.

I want to be able to associate a schema with the data (see http://www.ibm.com/developerworks/blogs/page/soma), and using atom:entry seems cleaner. But it's a small matter to say the schema link relation is scoped to the atom:entry atomInlineOtherContent type.


In practice, you don't want to put anything other than HTML in atom:content if you intend this feed to be consumed by general Atom processors and aggregators. Many aggregators (and feed re-publishers) will misbehave with anything other than <content type="html"> and escaped content.

You can add arbitrary XML elements as children of atom:entry, and use xml:lang to define what human language is within.

Of course, if you intend this feed to only ever be consumed by your own software it doesn't really matter what you do as long as your producer and your consumer agree.

If you are able to give more details about specifically what you are trying to do folks might be able to suggest a way to do it that does not involve extending Atom at all, at least at the XML level.

Reply via email to