capt webb
Capt. Horatio T.P. Webb
RSS Examples
Version 2 -- Last Updated 6:05 PM 10/24/2007

Here is a DTD for RSS:

<!ELEMENT rss (channel)>
<!ATTLIST rss version CDATA #FIXED "2.0">

<!--  From Userland at http://feeds.archive.org/validator/docs/rss2.html -->

<!ELEMENT channel ((item+)|
                   (title,link,description,(language|copyright|
                    managingEditor|webMaster|pubDate|lastBuildDate|
                    category|generator|docs|cloud|ttl|image|
                    textInput|skipHours|skipDays)*))>

<!ELEMENT item ((title|description)+,link?,
                (author|category|comments|enclosure|guid|pubDate|source)*)>

<!ELEMENT author (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ATTLIST category domain CDATA #IMPLIED>
<!ELEMENT cloud (#PCDATA)>
<!ATTLIST cloud domain CDATA #IMPLIED
                port CDATA #IMPLIED
                path CDATA #IMPLIED
                registerProcedure CDATA #IMPLIED
                protocol CDATA #IMPLIED>
<!ELEMENT comments (#PCDATA)>
<!ELEMENT copyright (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT docs (#PCDATA)>
<!ELEMENT enclosure (#PCDATA)>
<!ATTLIST enclosure url CDATA #REQUIRED
                    length CDATA #REQUIRED
                    type CDATA #REQUIRED>
<!ELEMENT generator (#PCDATA)>
<!ELEMENT guid (#PCDATA)>
<!ATTLIST guid isPermaLink (true|false) "true">
<!ELEMENT height (#PCDATA)>
<!ELEMENT image (url,title,link,(width|height|description)*)>
<!ELEMENT language (#PCDATA)>
<!ELEMENT lastBuildDate (#PCDATA)>
<!ELEMENT link (#PCDATA)>
<!ELEMENT managingEditor (#PCDATA)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT pubDate (#PCDATA)>
<!ELEMENT skipDays (#PCDATA)>
<!ELEMENT skipHours (#PCDATA)>
<!ELEMENT source (#PCDATA)>
<!ATTLIST source url CDATA #REQUIRED>
<!ELEMENT textInput (title,description,name,link)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT ttl (#PCDATA)>
<!ELEMENT url (#PCDATA)>
<!ELEMENT webMaster (#PCDATA)>
<!ELEMENT width (#PCDATA)>

<?xml version="1.0"?>
<rss version="2.0">
    <channel>
    <title>The channel's name goes here</title>
    <link>http://www.urlofthechannel.com/</link>
    <description>This channel is an example channel for an article.
    </description>
    <language>en-us</language>
    <image>
      <title>The image title goes here</title>
      <url>http://www.urlofthechannel.com/images/logo.gif</url>
      <link>http://www.urlofthechannel.com/</link>
    </image>
    <item>
      <title>The Future of content</title>
      <link>http://www.itworld.com/nl/ecom_in_act/11122003/</link>
      <description> The issue of people distributing and reusing
      digital media is a problem for many businesses. It may also be
      a hidden opportunity. Just as open source licensing has opened
      up new possibilities in the world of technology, it promises to do
      the same in the area of creative content.</description>
    </item>
    <item>
      <title>Online Music Services - Better than free?</title>
      <link>http://www.itworld.com/nl/ecom_in_act/08202003/</link>
      <description>More people than ever are downloading music from
      the Internet. Many use person-to-person file sharing programs like
      Kazaa to share and download music in MP3 format, paying nothing.
      This has made it difficult for companies to setup online music
      businesses. How can companies compete against free?</description>
    </item>
  </channel>
</rss>

As shown in the RSS 2.0 specs, the primary elements of the RSS feed (channel) are:

  • A XSL rollout here