As you know (or may not know, I need to update the My Tools pod), I have a RSS.cfc component that lets you parse RSS feeds in multiple formats. What it doesn't do yet is let you generate RSS. I've begun that work and run into a slight problem.

Each type of RSS feed has different needs when it comes to metadata. Typically these are the blog name and URL along with other elements. Right now to generate an RSS feed my API works like so:

<cfset rssData = rssCFC.generateRSS("rss091",data,meta)>

where meta is a structure. I take your structure and recursively dump it where each key name becomes a pair of starting and ending tags.

What I don't do now is actually validate your metadata. So for example. The image subkey is required for RSS 0.91. Now, I can certainly build a validator for the metadata for the RSS feeds I support. But at the same time, I don't want it to be a pain in the rear for folks to use. Should I simply let folks pass in metadata in whatever format they wish? I doubt most RSS parsers would fail on a RSS feed missing an image subtag. Should I provide an optional validateMeta() method you can run before passing info in? I don't want to do this if I don't bother using it when I generate the RSS. Another option is to fill in the missing items automatically with a empty set of data.

Thoughts?