Creating RSS and CDF files

Jiri Jirat
ZVON project, http://zvon.org


Formats: HTML , PDF

Table of contents 
1. Introduction
2. Process
3. Results
4. Preview
5. Tutorials and references on the Internet
References
List of Links

List of figures 
1. Summary of the process.
2. RSS file as a Mozilla sidebar.
3. RSS file as displayed on MyNetscape.com
4. CDF file as a Internet Explorer sidebar.

Abstract: RSS (RDF Site Summary) and CDF (Channel Definition Format) are XML based file formats (not only) for headlines syndication. I will show you, how to create the RSS and CDF files for your site easily from one (XML) source.

Keywords: XML, XSLT, RSS, CDF


 

 Introduction        [Go top]

Well, the first question - what is it good for? The simplest answer is - using this formats, sites and portals can easily exchange news. So if you are a webmaster, you can create such files and offer them to portals or to your visitors. Or you can collect RSS files from other sites and offer their news to your visitors. Let us mention some of the aggregators of RSS channels: my.netscape.com, my.userland.com, xmltree.com. If you are interested in the history and usage of RSS format, I recommend you Rael Dornfest's article [1].

CDF files are used by MS Internet Explorer and the installation is very straightforward - you just give the link to your CDF file and when the user opens it in the browser, it automatically proposes to add this channel to the browser's sidebar.

Recently [2] we have described the XML-based web site ZVON. Today we will briefly discuss further possibilities of the XML format - creating RSS and CDF files. There are very different versions of the RSS format, and compatibility is a problem. Fortunately, both RSS and CDF files are at least XML and thus all they can be easily generated from a custom format.

The whole process is just a couple of XSLT transformations which pull the headline information from a website's metadata files.


 

 Process        [Go top]

Figure 1 shows the process of creating different channel formats. Sources are XML files, which are then transformed to several different output (XML) formats. The XSLT transformation is run automatically as a part of the ZVON build process and transferred to the site together with HTML pages.

Figure 1: Summary of the process.


 

 Results        [Go top]

Let us look to the resulting files closely. RSS files also contain the definitions of image and textinput fields. RSS 0.91:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version="0.91">
  <channel>
    <title>ZVON</title>
    <link>http://www.zvon.org</link>
    <description>Source of (not only) XML related references and tutorials </description>
    <language>en-us</language>
    <image>
      <title>ZVON</title>
      <url>http://www.zvon.org/site/graphic/zvon.gif</url>
      <link>http://www.zvon.org</link>
      <width>85</width>
      <height>25</height>
      <description>References, tutorials, tools for XML ...</description>
    </image>
    <item>
      <title>XPath Tutorial</title>
      <link>http://www.zvon.org/xxl/XPathTutorial/General/examples.html</link>
      <description> - added graphical representation of the examples </description>
    </item>
    <item>
      <title>Article about Multimodal ZVON</title>
      <link>http://www.zvon.org/Documents/d1/MultimodalZvon.html</link>
      <description> About Multimodal ZVON - an article about ZVON infrastructure (available in HTML and PDF version) </description>
    </item>
    <item>
      <title>IDOOXOAP 1.1</title>
      <link>http://www.zvon.org/index.php?nav_id=34</link>
      <description> IDOOXOAP 1.1 released </description>
    </item>
    <item>
      <title>DOM1 Reference</title>
      <link>http://www.zvon.org/xxl/DOM1reference/Output/index.html</link>
      <description> - upgraded, examples reviewed, now conforms to DOM1 specification (errata included) </description>
    </item>
    <textinput>
      <title>Search</title>
      <description>Quick Search in references</description>
      <name>value</name>
      <link>http://zvon.org/search.php</link>
    </textinput>
  </channel>
</rss>




Figure 2: RSS file as a Mozilla sidebar.


Figure 3: RSS file as displayed on MyNetscape.com

RSS 1.0:
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
  <channel rdf:about="http://www.zvon.org/">
    <title>ZVON</title>
    <link>http://www.zvon.org/</link>
    <description>Source of (not only) XML related references and tutorials </description>
    <language>en-us</language>
    <image rdf:resource="http://www.zvon.org/site/graphic/zvon_rss.gif"/>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://www.zvon.org/xxl/XPathTutorial/General/examples.html"/>
        <rdf:li rdf:resource="http://www.zvon.org/Documents/d1/MultimodalZvon.html"/>
        <rdf:li rdf:resource="http://www.zvon.org/index.php?nav_id=34"/>
        <rdf:li rdf:resource="http://www.zvon.org/xxl/DOM1reference/Output/index.html"/>
      </rdf:Seq>
    </items>
    <textinput rdf:resource="http://zvon.org/search.php"/>
  </channel>
  <image rdf:about="http://www.zvon.org/site/graphic/zvon_rss.gif">
    <title>ZVON</title>
    <url>http://www.zvon.org/site/graphic/zvon_rss.gif</url>
    <link>http://www.zvon.org/</link>
  </image>
  <item rdf:about="http://www.zvon.org/xxl/XPathTutorial/General/examples.html">
    <title>XPath Tutorial</title>
    <link>http://www.zvon.org/xxl/XPathTutorial/General/examples.html</link>
    <description> - added graphical representation of the examples </description>
  </item>
  <item rdf:about="http://www.zvon.org/Documents/d1/MultimodalZvon.html">
    <title>Article about Multimodal ZVON</title>
    <link>http://www.zvon.org/Documents/d1/MultimodalZvon.html</link>
    <description> About Multimodal ZVON - an article about ZVON infrastructure (available in HTML and PDF version) </description>
  </item>
  <item rdf:about="http://www.zvon.org/index.php?nav_id=34">
    <title>IDOOXOAP 1.1</title>
    <link>http://www.zvon.org/index.php?nav_id=34</link>
    <description> IDOOXOAP 1.1 released </description>
  </item>
  <item rdf:about="http://www.zvon.org/xxl/DOM1reference/Output/index.html">
    <title>DOM1 Reference</title>
    <link>http://www.zvon.org/xxl/DOM1reference/Output/index.html</link>
    <description> - upgraded, examples reviewed, now conforms to DOM1 specification (errata included) </description>
  </item>
  <textinput rdf:about="http://zvon.org/search.php">
    <title>Search</title>
    <description>Quick Search in references</description>
    <name>value</name>
    <link>http://zvon.org/search.php</link>
  </textinput>
</rdf:RDF>


CDF:
<?xml version="1.0" encoding="utf-8"?>
<CHANNEL HREF="http://www.zvon.org/" BASE="http://www.zvon.org/">
  <TITLE>ZVON</TITLE>
  <ABSTRACT>Source of (not only) XML related references and tutorials</ABSTRACT>
  <SCHEDULE>
    <INTERVALTIME DAY="1"/>
  </SCHEDULE>
  <ITEM HREF="http://www.zvon.org/xxl/XPathTutorial/General/examples.html">
    <TITLE>XPath Tutorial</TITLE>
    <ABSTRACT> - added graphical representation of the examples </ABSTRACT>
  </ITEM>
  <ITEM HREF="http://www.zvon.org/Documents/d1/MultimodalZvon.html">
    <TITLE>Article about Multimodal ZVON</TITLE>
    <ABSTRACT> About Multimodal ZVON - an article about ZVON infrastructure (available in HTML and PDF version) </ABSTRACT>
  </ITEM>
  <ITEM HREF="http://www.zvon.org/index.php?nav_id=34">
    <TITLE>IDOOXOAP 1.1</TITLE>
    <ABSTRACT> IDOOXOAP 1.1 released </ABSTRACT>
  </ITEM>
  <ITEM HREF="http://www.zvon.org/xxl/DOM1reference/Output/index.html">
    <TITLE>DOM1 Reference</TITLE>
    <ABSTRACT> - upgraded, examples reviewed, now conforms to DOM1 specification (errata included) </ABSTRACT>
  </ITEM>
</CHANNEL>




Figure 4: CDF file as a Internet Explorer sidebar.


 

 Preview        [Go top]

A brief list of selected validator/preview tools follows:


 

 Tutorials and references on the Internet        [Go top]

Many references and tutorials can be found on the Internet. Let us mention some of them:

And, of course, our references:


References 
1.   Rael Dornfest, "RSS: Lightweight Web Syndication", July 17, 2000 http://www.xml.com/pub/a/2000/07/17/syndication/rss.html
    Cited: [1]
2.   Jiri Jirat, ZVON.org, 2001, http://www.zvon.org/Documents/d1/MultimodalZvon.html
    Cited: [1]

List of links 
http://my.netscape.com
    Cited: [1]
http://my.userland.com
    Cited: [1]
http://www.xmltree.com
    Cited: [1]
http://zvon.org
    Cited: [1]
http://blogspace.com/rss/compatibility
    Cited: [1]
http://www.zvon.org/Documents/d1/MultimodalZvon.html
    Cited: [1] , [2]
http://my.netscape.com/publish/help/validate.tmpl
    Cited: [1]
http://www.redland.opensource.ac.uk/rss
    Cited: [1]
http://www.redland.opensource.ac.uk/rss?parser=repat&uri=http://www.zvon.org/meta/RSS/Output/RSS1.0.rss&box=yes
    Cited: [1]
http://www.zvon.org/meta/RSS/Output/zvon.cdf
    Cited: [1]
http://my.netscape.com/publish/
    Cited: [1]
http://www.oreillynet.com/pub/a/network/2000/08/25/magazine/rss_tut.html
    Cited: [1]
http://groups.yahoo.com/group/rss-dev/files/specification.html
    Cited: [1]
http://msdn.microsoft.com/workshop/delivery/cdf/tutorials/generic.asp
    Cited: [1]
http://zvon.org/xxl/DCreference/Output/index.html
    Cited: [1]
http://zvon.org/xxl/RSS0.9reference/Output/index.html
    Cited: [1]
http://zvon.org/xxl/RSS0.91reference/Output/index.html
    Cited: [1]
http://zvon.org/xxl/RSSreference/Output/index.html
    Cited: [1]
http://www.xml.com/pub/a/2000/07/17/syndication/rss.html
    Cited: [1]