Chapter 6. RSS 1.0 (RDF Site Summary)

Live in fragments no longer. Only connect, and the beast and the monk, robbed of the isolation that is life to either, will die.

E. M. Forster, Howards End

Now that we're steeped in metadata and RDF syntax, it's time to move on to RSS 1.0. This standard, released in December 2000, brought about two major changes to the RSS world: the reintroduction of RDF and with it an introduction of namespaces .

The reintroduction of RDF requires key changes in the syntax of RSS, but it also introduces the advantages and concepts we dealt with in Chapter 5. Namespaces are the XML solution to the classic language problem of one word meaning two things in different contexts. Take " windows ," for example. In the context of houses , "windows" are holes in the wall through which we can look. In the context of computers, " Windows " is a trademark of the Microsoft Corporation and refers to their range of operating systems. The context within which the name has a particular meaning is called its namespace.

In XML, we can distinguish between the two meanings by assigning a namespace and placing the namespace's name in front of the element name, separated by a colon , like this:

 <computing:windows>This is an operating system</computing:windows>     <building:windows>This is a hole in a wall</building:windows> 

Namespaces solve two problems. First, they allow you to distinguish between different meanings for words that are spelled the same way, which means you can use useful words more than once for different meanings. Second, they allow you to group together words that are related to each other using a computer to look through an XML document for all elements with a certain namespace is easy.

RSS 1.0 uses namespaces to allow for modularization . The modularization of RSS 1.0 means that developers can add new features to RSS 1.0 documents without changing the core specification. In RDF terms, this means we have included another vocabulary.

Modularization has great advantages over RSS 0.9x's method for including new elements. For starters, anyone can create a module: there are no standards issues or any need for approval, bar making sure that the namespace you use has not been used before. And, it means RSS 1.0 is potentially far more powerful that RSS 0.9x, with modules adding features for syndicating details of streaming media, Wikis, real-world events, and much more, not to mention the simplicity of adding the hundreds of vocabularies that already exist in the RDF community.

We'll look at many different modules in Chapter 7, but in the meantime, Example 6-1 shows a sample RSS 1.0 document that uses four additional modules: Dublin Core, Syndication, Company, and Text Input.

Example 6-1. A sample RSS 1.0 document
 <?xml version="1.0" encoding="utf-8"?>     <rdf:RDF  xmlns=""   xmlns:rdf=""    xmlns:dc=""   xmlns:sy=""   xmlns:co=""   xmlns:ti="" >        <channel rdf:about="">   <title>Meerkat</title>   <link></link>   <description>Meerkat: An Open Wire Service</description>   <dc:publisher>The O'Reilly Network</dc:publisher>   <dc:creator>Rael Dornfest (</dc:creator>   <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>   <dc:date>2000-01-01T12:00+00:00</dc:date>   <sy:updatePeriod>hourly</sy:updatePeriod>   <sy:updateFrequency>2</sy:updateFrequency>   <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>       <image rdf:resource="" />   <textinput rdf:resource="" />       <items>     <rdf:Seq>       <rdf:li rdf:resource="" />     </rdf:Seq>   </items> </channel>     <image rdf:about="">   <title>Meerkat Powered!</title>   <url></url>   <link></link> </image>     <textinput rdf:about="">   <title>Search Meerkat</title>   <description>Search Meerkat's RSS Database...</description>   <name>s</name>   <link></link>   <ti:function>search</ti:function>   <ti:inputType>regex</ti:inputType> </textinput>     <item rdf:about="">   <title>XML: A Disruptive Technology</title>   <link></link>   <dc:description>This the description of the article</dc:description>   <dc:publisher>The O'Reilly Network</dc:publisher>   <dc:creator>Simon St.Laurent (</dc:creator>   <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>   <dc:subject>XML</dc:subject>   <co:name></co:name>   <co:market>NASDAQ</co:market>   <co:symbol>XML</co:symbol> </item> </rdf:RDF> 

Content Syndication with RSS
Content Syndication with RSS
ISBN: 0596003838
EAN: 2147483647
Year: 2005
Pages: 96 © 2008-2017.
If you may any questions please contact us: