The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
	   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XML::RSS::Tools &gt; Simple Introduction</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15" />
<link rel="StyleSheet" href="./style.css" type="text/css" />
</head>
<body>

<h1>Simple Introduction To RSS</h1>

<h2>RSS/RDF</h2>

<p>Rich Site Summary/Resource Description Framework technology is a
simple method of a site describing what it has, so that another
site can summarise the content, and provide links back to the
original content.</p>

<p>RSS was pioneered by <a href="http://my.netscape.com/publish/formats/rss-spec-0.91.html">Netscape Communications</a> for their <em>my.netscape</em> portal, and adopted quickly
by many others, notably <a href="http://backend.userland.com/rss092">userland.com</a>.</p>

<h2>XML</h2>

<p>A simple <a href="http://www.w3.org/XML/">XML</a> file is produced by the site
originating the articles. This file, easily obtainable by HTTP, is downloaded and
parsed by the client, allowing the client to present the site summary in a way
that suits the client. XML provides a simple human readable format
that is easy to generate and read, using typical web tools.</p>

<h2>Principle</h2>

<p>The module came from a simple idea, gather RSS feeds, convert them into
HTML fragments and then template them into a web page on a local web
server.</p>

<h3>Downloading RSS files</h3>

<p>Originally I used <a href="http://www.gnu.org/software/wget/wget.html">wget</a>,
to pull files down from their server. Other tools to do this include
<a href="http://curl.haxx.se/">cURL</a> and any web browser. I cached the RSS feeds 
on my web server's disk space to reduce unnecessary downloading.</p>

<h3>RSS Normalisation</h3>

<p>RSS feeds come in several incompatible families. To make conversion to HTML
simple I opted to convert all RSS feeds to RSS version 0.91 as this is very
simple to convert to HTML via <a href="http://www.w3.org/Style/XSL/">XSLT</a>. You can
turn of normalisation if you plan to use just one XSLT stylesheet.</p>

<p>The underlying <a href="http://perl-rss.sourceforge.net/">XML::RSS</a> (up to version 0.97) core can
parse and interconvert RSS Versions 0.9, 0.91 and 1.0, versions of XML::RSS 0.98 and beyond can
additionally process RSS version 2.0, though it is unlikley to ever be able to process the largly
unused versions 0.92, 0.93, and 0.94, which are the evolutionary steps from 0.91 to 2.0.</p>

<h3>RSS Conversion</h3>

<p>Most online examples of RSS use the XML::RSS module to programmatically convert the feed into
HTML, either directly or via using one of the many quality HTML templating tools. This I felt
was inefficient and so I opted to use "XML Stylesheet Language Transformation", which is
industry standard and does not require programming. There are several XSLT processors available:
<a href="http://saxon.sourceforge.net/">Saxon</a>, <a href="http://xml.apache.org/">Xalan</a>,
MSXML, and <a href="http://www.gingerall.com/charlie/ga/xml/p_sab.xml">Sablotron</a>, however
the fastest and easiest one for Perl is Matt Sergeant's <a href="http://xmlsoft.org/"
title="The XML C Library for Gnome">XML C Library for Gnome</a> based
<a href="http://search.cpan.org/search?dist=XML-LibXSLT">LibXSLT</a>.</p>

<h3>Script to Module</h3>

<p>After developing the script to do this I realised that much of the code could be
converted into a module and distributed to the world. After a popular post to
<a href="http://www.perlmonks.org/">Perlmonks</a>, I have moved the module up to <a href="http://www.cpan.org/">CPAN</a>. The code should be considered as <strong>beta</strong>
code, and the API may change somewhat in the near future.</p>

<h2>Examples</h2>

<p>Some basic examples of how to use this module are provided in the examples folder. Simple
explanations can be found here:</p>
<ul>
<li><a href="./example1.html">Example 1</a> - simple example</li>
<li><a href="./example2.html">Example 2</a> - complete example</li>
<li><a href="./example3.html">Example 3</a> - consise example</li>
<li><a href="./example4.html">Example 4</a> - single stylesheet example with no normalisation</li>
<li><a href="./rss_with_xslt.html">Processing RSS with XSLT</a> - an article from The Perl Review</li>
</ul>

<h2>Resources</h2>

<ul>
<li>Userland.com the home of key RSS developments: <a href="http://backend.userland.com/rss092">backend.userland.com</a></li>
<li>SOAP Client RSS to HTML online tool: <a href="http://soapclient.com/rss/rss.html">soapclient.com/rss/rss.html</a></li>
<li>Netscape Communications: <a href="http://my.netscape.com/publish/formats/rss-spec-0.91.html">my.netscape.com/publish/formats/rss-spec-0.91.html</a></li>
<li>W3C Standards body: <a href="http://www.w3.org/RDF/">www.w3.org/RDF/</a> &amp; Validator: <a href="http://www.w3.org/RDF/Validator/">www.w3.org/RDF/Validator/</a></li>
<li>Blogspace RSS FAQ: <a href="http://blogspace.com/rss/">blogspace.com/rss/</a></li>
<li>RSS Versions: <a href="http://www.webreference.com/authoring/languages/xml/rss/1/8.html">www.webreference.com/authoring/languages/xml/rss/1.8.html</a></li>
<li>Ben Hammersley's Content Syndication with XML and RSS: <a href="http://rss.benhammersley.com/">rss.benhammersley.com</a></li>
<li>Dave Beckett's Resource Description Framework Resource Guide: <a href="http://www.ilrt.bristol.ac.uk/discovery/rdf/resources/">www.ilrt.bristol.ac.uk/discovery/rdf/resources/</a></li>
<li>Mark Pilgrim and Sam Ruby's RSS Validator: <a href="http://feeds.archive.org/validator/">feeds.archive.org/validator/</a></li>
<li><tt>brian d foy</tt> has an interesting, article in The Perl Review: <a href="http://www.theperlreview.com/Issues/v0i6.shtml">www.theperlreview.com/Issues/v0i6.shtml</a></li>
<li>Mark Pilgrim has a nice introduction to RSS on XML.com (alas Python code examples): <a href="http://www.xml.com/lpt/a/2002/12/18/dive-into-xml.html">www.xml.com/lpt/a/2002/12/18/dive-into-xml.html</a></li>
<li>Bob DuCharme wrote a simple introduction to using XSLT with RSS on XML.com: <a href="http://www.xml.com/lpt/a/2003/01/02/tr.html">Never Mind the Namespaces: An XSLT RSS Client</a></li>
</ul>

<h2>Some Example RSS Feeds</h2>

<ul>
<li><a href="http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/front_page/rss091.xml">www.bbc.co.uk/syndication/feeds/news/ukfs_news/front_page/rss091.xml</a></li>
<li><a href="http://www.guardian.co.uk/rss/">www.guardian.co.uk/rss/</a></li>
<li><a href="http://freshmeat.net/backend/fm.rdf">freshmeat.net/backend/fm.rdf</a></li>
<li><a href="http://slashdot.org/slashdot.rdf">slashdot.org/slashdot.rdf</a></li>
<li><a href="http://www.oreillynet.com/meerkat/?_fl=rss10">www.oreillynet.com/meerkat/?_fl=rss10</a></li>
<li><a href="http://www.theregister.co.uk/tonys/slashdot.rdf">www.theregister.co.uk/tonys/slashdot.rdf</a></li>
<li><a href="http://www.sophos.com/virusinfo/infofeed/tenalerts.xml">www.sophos.com/virusinfo/infofeed/tenalerts.xml</a></li>
<li><a href="http://www.perl.com/pace/perlnews.rdf">www.perl.com/pace/perlnews.rdf</a></li>
</ul>

<div id="footnote">
	<div style="text-aign: right; float: right;"><a href="http://www.w3.org/RDF/" title="RDF Resource Description Framework"><img src="./rdf_powered_button.32.gif" alt="RDF Resource Description Framework Powered Icon" /></a></div>
	<p>Copyright iredale Consulting 2002-2003</p>
</div>
</body>
</html>