Name

mod_content

Synopsis

mod_content is perhaps the most misunderstood module of all. Its purpose isn’t only to allow much richer content—the entire site, images and all, for example—to be included within a RSS 1.0 item, but also to give a complete RDF description of this content. Now, not only can you make RDF graphs from channel to item, but you can also make them from item to an image within an item. An RDF query of “find all feeds that point to articles accompanied by a picture of an elephant” can now be executed easily because mod_content provides not just the content itself, but the relationship metadata as well. It can also be used to split the object to which an item points into smaller sections, from the standpoint of an RDF parser.

The syntax for this can look a little long-winded—RDF is rather verbose when written in XML—and, because of this, mod_content feeds can often look scary. They’re not really, and reformatting them in a text editor can give you an idea of what is happening. Despite this apparent complexity, it is one of the only modules to have been officially accepted by the rss-dev working group.

It must be noted that mod_content isn’t to be confused with the core specification’s description subelement of item. Some RSS 1.0 feeds use description to contain the content the item represents. While this may be common practice with RSS 0.9x users, RSS 1.0 users may wish to do it properly. description is for a description of the content; mod_content is for the content ...

Get Developing Feeds with RSS and Atom now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.