Adam John Trickett
and 1 contributors

NAME

Example-2 - A Longer example

Example 2

This more complex example is designed to show a normal command line or CGI application. After loading the normal modules, and unbuffering STDOUT, the URI of the site, and the style sheet are grabbed from the command line (if present), and the rss and cgi objects are created. Checking the request method to determine if the application is running in CGI or command line mode, a HTML header is sent if appropriate and then the application checks for required inputs.

Assuming the pre-requisites have all been met, then the rss object is loaded with the source rss, xsl Template, and the transformation is performed. If at any stage an error is detected, all calls return rss method calls return true on success, an error message is generated, and sent to the user.