RemoteContent helper for Monorail

I’m finishing up the website for my JavaScript UI project and the only thing left is to add some content and fix the style a little bit. I’m also enjoying flexibility that Monorail provides. For example, I decided to publish announcements on the front page and to pull them from CS forums. CommunityServer is a separate application so it’s hard to access it directly to retrieve the posts, but forums expose an RSS feed with all the latest messages. With some inspiration from the CS community and Cuyahoga (which provides remote content module) I decided to pull announcements via RSS and transform them into HTML using XSLT.

Surprisingly it was easy to write the helper since .NET XML classes already support working with URLs and loading XML documents from remote locations. All I had to do was to write code to load XSLT from the local directory and spit out the transformation results. For those interested to see implementation I’ve uploaded the files together with an XSLT file to transform CS forum feed into HTML - RemoteContentHelper.zip

If you’re developing with Monorail and nVelocity adding the feed is really simple. Just add the following line to your template where you want the feed to appear:

$RemoteContentHelper.TransformFeed( "feedUrl", "transformation.xslt" )

Please feel free to leave a comment if you have any questions or remarks.



Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: Slava
Posted on: 7/11/2005 at 11:25 AM
Categories: .NET
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

Friday, November 21, 2008 3:50 AM