Transforming RSS into HTML and WAP I (1/2) - exploring XML | WebReference

Transforming RSS into HTML and WAP I (1/2) - exploring XML

Transforming RSS into HTML and WAP I

Having examined XSL, WAP and RSS in great detail in past columns, it is time to combine all that knowledge into a useful application: rendering RSS channels in various formats with the help of XSL style sheets. Three acronyms in the headline alone might not look like easy reading, but when you have read columns 1, 12, and 13 you'll be in good shape for the things ahead.

The task at hand

In the last article we learned about some good sources for news of all kinds, published in the RSS format. Some of these sites offer tools to integrate the content into your own Web site. There are various ways to accomplish this:

A Perl Script

My fellow WebReference columnist Jonathan Eisenzopf has created a Perl script for reading RSS channels in a Web server CGI and outputting them as HTML. The channelmanager is a perfect fit for CGI-driven Web sites. Due to the strict server-side solution, few client dependencies exist, as long as the HTML output is formatted for cross-browser compatibility. One challenge exists in getting the XML tools for Perl compiled for your Web server platform, since many of them, including the Perl::XML XML parser, are written in C and then bound to Perl.

A Java Applet

An alternative is to use my RSSViewerApplet to decode and display RSS channels in the client. While the applet seems to work fine across browsers by only using Java 1.0 minimal APIs, it will not work in browsers that have Java disabled. Security restrictions prevent the applet from reading RSS files from hosts other than the one it came from. This is not very helpful for displaying channels from other sites. On the upside integration in any Web site is a snap: Creating an HTML page with the right <applet> tag is all it needs!

A Javascript Script

Moreover offers its content in various formats. The easiest way to integrate their offering into one's own Web site is to use their Javascript wizard, which offers many configuration options to choose content and appearence of the Moreover news feeds. In the end, the Javascript code is emailed back to the user for inclusion in any Web page. While the process is very convenient, the resulting Javascript code needs to be verified for future browser versions, and of course won't work if scripts are disabled in the browser. Because the code is distributed to all syndicating sites, a possible maintenance effort will be substantial.

On to servlets.

https://www.internet.com

Produced by Michael Claßen
All Rights Reserved. Legal Notices.

URL: https://www.webreference.com/xml/column15/index.html
Created: Jul 18, 2000
Revised: Jul 18, 2000