Metadata properties for CFFEED

When creating RSS feeds with the CFFEED tag, you can specify metadata properties for the feed that help describe the feed in general. The docs though aren't very clear on what metadata properties you can provide.

The docs say that for RSS 2.0 feeds the title, link, description, and version properties are required, but all others are optional. What others? I was never able to find documentation that describes what fields you can use. At the same time though CFFEED is smart enough to recognize valid fields. If you pass a field named "ray" for example, it ignores it when creating the feed. So what is available? I did some Googling and I found a specification for RSS 2:

RSS 2.0 at Harvard Law

The docs here listed a bunch of items all of which worked. In general they were all simple to use. For example, here was my initial metadata based on what I had to pass:

<!--- Struct to contain metadata --->
<cfset meta = structNew()>
<cfset meta.title = "Orange Whip Studio Films">
<cfset meta.link = "http://localhost/ows">
<cfset meta.description = "Latest Films">

Next I added additional fields:

<cfset meta.language = "Klingon">
<cfset meta.copyright = "I own you.">
<cfset meta.managingEditor = "ray@camdenfamily.com">
<cfset meta.webmaster = "ray@camdenfamily.com">
<cfset meta.pubDate = now()>
<cfset meta.lastBuildDate = now()>

This worked fine until I hit categories. Categories have been an array of a structs:

<cfset meta.category = []>
<cfset meta.category[1] = structNew()>
<cfset meta.category[1].value = "Boogers">

Why? Because categories support an optional domain field. To supply the domain just add it as a key:

<cfset meta.category = []>
<cfset meta.category[1] = structNew()>
<cfset meta.category[1].domain = "foo">
<cfset meta.category[1].value = "Boogers">

Another complex value is the cloud key. This takes 5 subkeys:

<cfset meta.cloud = structNew()>
<cfset meta.cloud.domain ="rpc.sys.com">
<cfset meta.cloud.port = "80">
<cfset meta.cloud.path = "/rpc2">
<cfset meta.cloud.registerProcedure="pingMe">
<cfset meta.cloud.protocol = "soap">

Lastly - both the skipdays and skiphours fields require special values - and these are actually documented. The skipdays value is a list of days and skiphours is a list of hours.

<cfset meta.skipHours = "0,1,2,3,4,5,6">
<cfset meta.skipDays = "Saturday,Sunday">

Another cool metadata field is image. When used, this provides a nice little logo when viewing the feed. (At least it did in Firefox.)

<cfset meta.image = structNew()>
<cfset meta.image.title = "Logo">
<cfset meta.image.url = "http://localhost/ows/images/logo_a.gif">
<cfset meta.image.link = meta.link>

One field in particular that was interesting was the textInput field. Form the specs:

A channel may optionally contain a <textInput> sub-element, which contains four required sub-elements.

Ok - that's cool - but then the next paragraph reads:

The purpose of the <textInput> element is something of a mystery. You can use it to specify a search engine box. Or to allow a reader to provide feedback. Most aggregators ignore it.

Sweet. I love it when specs say something is a mystery. Below is the complete set of metadata I tried, all of which worked (except textInput, it did show up in the xml, but Firefox didn't do anything with it). Tomorrow I'm going to do the same digging for Atom.

<!--- Struct to contain metadata --->
<cfset meta = structNew()>
<cfset meta.title = "Orange Whip Studio Films">
<cfset meta.link = "http://localhost/ows">
<cfset meta.description = "Latest Films">

<cfset meta.language = "Klingon">
<cfset meta.copyright = "I own you.">
<cfset meta.managingEditor = "ray@camdenfamily.com">
<cfset meta.webmaster = "ray@camdenfamily.com">
<cfset meta.pubDate = now()>
<cfset meta.lastBuildDate = now()>

<cfset meta.category = []>
<cfset meta.category[1] = structNew()>
<cfset meta.category[1].domain = "foo">
<cfset meta.category[1].value = "Boogers">

<cfset meta.generator = "ColdFusion 8, baby">
<cfset meta.docs = "http://cyber.law.harvard.edu/rss/rss.html">

<cfset meta.cloud = structNew()>
<cfset meta.cloud.domain ="rpc.sys.com">
<cfset meta.cloud.port = "80">
<cfset meta.cloud.path = "/rpc2">
<cfset meta.cloud.registerProcedure="pingMe">
<cfset meta.cloud.protocol = "soap">

<cfset meta.ttl = 60>

<cfset meta.image = structNew()>
<cfset meta.image.title = "Logo">
<cfset meta.image.url = "http://localhost/ows/images/logo_a.gif">
<cfset meta.image.link = meta.link>

<cfset meta.rating = "pics rating">

<cfset meta.textInput = structNew()>
<cfset meta.textInput.title = "Search">
<cfset meta.textInput.description = "Use this to search our site">
<cfset meta.textInput.name = "search">
<cfset meta.textInput.link = "http://localhost/ows/69/_temp.cfm">

<cfset meta.skipHours = "0,1,2,3,4,5,6">
<cfset meta.skipDays = "Saturday,Sunday">

<cfset meta.version = "rss_2.0">

Comments

I don't think there are many aggregators that actually use the textInput element.
http://www.w3schools.com/rss/rss_tag_textinput.asp...

Another good source for RSS element information is ..
http://www.w3schools.com/rss/rss_reference.asp

For Atom try ..
http://www.atomenabled.org/developers/syndication/...
or for the official spec..
http://www.atomenabled.org/developers/syndication/...atom-format-spec.php" target="_blank" rel="nofollow">http://www.atomenabled.org/developers/syndication/......
# Posted By Ben Garrett | 8/22/07 8:40 PM
I don't think your comments like url's with dashes in them ..

/developers/syndication/atom-format-spec.php
# Posted By Ben Garrett | 8/22/07 8:44 PM
How could you solve the following. My feeds are all compressed and the CFFEED tag cannot handle them :-( It would be (I think) a good addition to solve this within Coldfusion because you have the same problem with the CFHTTP tag whenever content is compressed.

Any suggestions??
# Posted By Tjarko | 8/23/07 10:46 AM
You got me there. Seems like a good enhancement request though. http://www.adobe.com/go/wish
# Posted By Raymond Camden | 8/23/07 10:53 AM
It's in the mail.. it would be really nice indeed if the boys and girls at Adobe would put that in.. Or if someone would come up with a Java solution.. anyone??
# Posted By Tjarko | 8/24/07 2:19 AM
Hi Tjarko/Ray,
try this (a way around solution suggest bu Rupes of CF engineeering team) but as per Hemant (CF engineering manager) in the comments below this has already been logged & should be taken taken of
http://coldfused.blogspot.com/2007/08/using-cffeed...
# Posted By Rahul Narula | 8/30/07 8:01 AM
I am trying to place meta data in a site. These are the remaining <cfset Meta???=" "> codes that I need to locate and place on the site. The rest I've figured out. If you guys/girls can enlighten me as to the correct cfset tags
to use so I can complete it, I would appreciate it.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

What I want to add is:

1) Language identification
2) reply-to
3) category
4) rating
5) robots index all
6) robots revisit after 14 days

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The HTML equivilant is:

1) <meta http-equiv="Content-Language" content="en">
2) <meta name="reply-to" content="info@autoadvisors.com">
3) <meta name="category" content="Business & Economy">
4) <meta name="rating" content="General">
5) <meta name="robots" content="all">
6) <meta name="revisit-after" content="14 days">

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

If anyone has any other lines of code they would suggest placing for site optimization, please feel free to suggest.

Thanks in advance,
# Posted By B. Dailey | 12/21/07 3:02 PM
Um, this article is about metadata for RSS feeds. It has nothing to do with metadata tags for HTML pages.
# Posted By Raymond Camden | 12/21/07 3:07 PM
My Apologies. Is there anyone that you could direct me to that would have the insight? It's actually for metadata for a Coldfusion site, my example is what I've found which is the html equivalent. I'm unfamiliar with the tags.

Again, thanks in advance, (and your patience)
# Posted By B. Dailey | 12/21/07 7:28 PM
You don't do anything special on a CF site to add HTML meta tags, or any tag. If you do <FOO>, CF will ignore it. CF only looks for it's own tags and functions.
# Posted By Raymond Camden | 12/21/07 7:53 PM