Thursday April 17, 2003
Joe Hewitt Comments I did a bit of research today and it looks fairly simple to incorporate Joe Hewitt-style comments into Roller. The hard part will be figuring out a way to convert an entry's comments into XML. For instance, Joe loads an XML document (sample) that contains all the comments for a given post. This document has a DTD which will hopefully make things easier. Here's what a sample XML-based comment entry looks like:
<comment id="000178"> <author>Joe Hewitt</author> <email /> <url /> <timestamp>April 3, 2003 04:14 PM</timestamp> <body> <p>I have readers??</p> </body> </comment>
Looks pretty simple eh? So how do we convert comments to XML? Since they're already (or supposed to be) XHTML, should we just use a JSP and JSTL's "x" tag to do a little XSL? That sounds like an easy solution. Or should we figure out a way that we can hit the RSS feed (which could be enhanced to include comments)? Once we've done this, there's some JavaScript to load this document.
// Make url unique to prevent loading it from cache var cacheKiller = new Date().getTime(); // replace this with a link to a JSP or something var url = "/content/blog/comments/" + aEntryId + ".xml?" + cacheKiller; loadXMLDocument(url, onCommentsLoaded);
Please comment with any ideas for the comments-to-XML conversion. Posted in Roller at Apr 17 2003, 01:00:34 PM MDT 3 Comments
Search This Site
Recent Entries
- How We Hired a Team of 10 in 2 Months
- Jack's Skiing Like A Madman!
- My Future of Web Frameworks Presentation
- My Guest Room Remodel is finished!
- Web Application Testing with Selenium by Jason Huggins
- Web Application Testing with Selenium at Agile Denver next Monday
- 17" MacBook Pro Stolen from Living Room
- Using JRebel with IntelliJ IDEA on OS X
- Reviews for Grails: A Quick-Start Guide and Kanban and Scrum
- Upside Down Man Saves the Day
Posted by Simon Brown on April 17, 2003 at 02:26 PM MDT #
Posted by Paul Rivers on April 17, 2003 at 05:33 PM MDT #
Posted by Matt on April 18, 2003 at 02:24 PM MDT #