About

I'm Mike Pope. I live in the Seattle area. I've been a technical writer and editor for over 30 years. I'm interested in software, language, music, movies, books, motorcycles, travel, and ... well, lots of stuff.

Read more ...

Blog Search


(Supports AND)

Google Ads

Feed

Subscribe to the RSS feed for this blog.

See this post for info on full versus truncated feeds.

Quote

Writers like to think that writing is like Arctic exploration or flying the Atlantic solo but really it's more like golf. You've got to go out and do it every day and live by the results. You can brood over it but in the end you've got to take the club out of the bag and take your swing. You hit the ball to where it wants to go, a series of eighteen small steel cups recessed in turf, on a course that others have traversed before you. You are not the first. You accomplish this by practicing an elegant economy you learned from others and thereby overcoming your damn self-consciousness which trips you up every time.

— Garrison Keillor



Navigation





<October 2014>
SMTWTFS
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

Categories

  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  

Contact

Email me

Blog Statistics

Dates
First entry - 6/27/2003
Most recent entry - 10/16/2014

Totals
Posts - 2312
Comments - 2502
Hits - 1,677,634

Averages
Entries/day - 0.56
Comments/entry - 1.08
Hits/day - 405

Updated every 30 minutes. Last: 10:44 PM Pacific


  12:48 AM

I added a comment feed to the blog. I see this on just a few blogs, as reflected in my aggregator (RSSBandit):



(Courtesy of ComputerZen.com in this case.)

It was not 100% clear to me what exactly to implement, elements wise. I got the original comment API spec from the Well-Formed Web site. I also poked around in a couple of existing comment feeds, including Scott Hanselman's comment feed and the comment feed from the ASP.NET Web logs site. The three sources didn't completely agree about what elements to provide, but as Joe Gregorio says on the Well-Formed Web site:
... the contents of the 'item' element are guided by the RSS 2.0 specification, which states that all elements are optional, but requires that at least one of 'title' or 'description' are present.
All right, then.

If you want to see what it looks like, have a peek at this feed:

http://www.mikepope.com/blog/blogcommentsfeed.ashx?id=1457

You might note that this feed is implemented as an ASP.NET HTTP handler, which conforms to a, er, suggestion from Nikhil. (The main feed is implemented as a Web service.) The extension is .ashx, the default handler. One day Real Soon Now I'll get around to remapping the .rss extension to the ASP.NET ISAPI and configuring the blog app to handle that.

To expose the comment feed, I updated the main feed (http://mikepope.com/blog/blogfeed.asmx/GetRSS?) to include a couple of new elements, including <wfw:commentRss/> and <slash:comments/>. This required that I learn how to specify a namespace and prefix for an element ... you learn something new every day, it seems.

So this was all fun and stuff. I'll describe another day how I went about creating the RSS for this, which I'll note for now did not involve creating an XmlDocument and populating it element by element.

One slight problem, though: as at this moment, my aggregator is not actually recognizing that I have a comment feed available. I've looked over the main feed, and it seems to be listing the comment feed URL properly. And the comment feed seems to be well-formed and all that. So I don't know what's wrong exactly, unless it's a problem with cache latency or something. Or I'm fundamentally not understanding how this comment-feed thing works.

If you've got any insights, I'd sure like to hear them. Or, of course, if this actually works in your aggregator, or -- horrors -- if it horks things up.

Update Ok, I got it. Once again I am flummoxed by dynamically creating XML elements. I ended up having to do something like this:
Dim commentRSS, commentCount As XmlElement
commentRss = doc.CreateElement("wfw", "commentRss", "http://wellformedweb.org/CommentAPI/")
commentCount = doc.CreateElement("slash", "comments", "http://purl.org/rss/1.0/modules/slash/")
IOW, I had to pass the XML namespace URI explicitly in the create method even though all the namespaces are declared in the <rss/> block at the top of the XML file. It'd be nice not to have to do this. Also, I obviously need to understand more about XML manipulation. All the more then, for doing the comment feed the way I did, as you'll see ...

[categories]  

[1] |