XML Tutorials

  Home arrow XML Tutorials arrow Page 2 - Using Modules in Your RSS Feed
XML TUTORIALS

Using Modules in Your RSS Feed
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-04-10

    Table of Contents:
  • Using Modules in Your RSS Feed
  • blogChannel Module
  • Simple Semantic Resolution Module
  • ICBM Module

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    Using Modules in Your RSS Feed - blogChannel Module


    (Page 2 of 4 )

    Designed by Dave Winer only a week after he formalized RSS 2.0, the blogChannel module allows the inclusion of data used by weblogging applications and, specifically, the newer generation of aggregating and filtering systems.

    It consists of three optional elements, all of which are subelements of channel and have the following namespace declaration:

      xmlns:blogChannel="http:// backend.userland.com/blogChannelModule"

    The elements are:

    blogChannel:blogRoll

    Contains a literal string that is the URL of an OPML file containing the blogroll for the site. A blogroll is the list of blogs the blog author habitually reads.

    blogChannel:blink

    Contains a literal string that is the URL of a site the blog author recommends the reader visits.

    blogChannel:mySubscriptions

    Contains a literal string that is the URL of the OPML file containing the URLs of the RSS feeds to which the blog author is subscribed in her desktop reader.

    Example 4-4 shows the beginning of an RSS 2.0 feed using the blogChannel module.

    Example 4-4. An RSS 2.0 feed with the blogChannel module

    <?xml version="1.0"?>
    <rss version="2.0" xmlns:blogChannel="http://backend.userland.com/
    blogChannelModule">
    <channel>
      <title>RSS2.0Example</title>
      <link>http://www.exampleurl.com/example/ index.html</link>
     
    <description>This is an example RSS 2.0 feed</description>
     
    <blogChannel:blogRoll>http:// www.exampleurl.com/blogroll.opml </blogChannel:blogRoll> <blogChannel:blink>http://www.benhammersley.com
    </blogChannel:blink> <blogChannel:mySubscriptions>http:// www.exampleurl.com/mySubscriptions.opml </blogChannel:mySubscriptions>
    ...

    Creative Commons Module

    Also designed by Dave Winer, the Creative Commons module allows RSS 2.0 feeds to specify which Creative Commons license applies to them. The Creative
    Commons organization, http://creativecommons.org/, offers a variety of content licenses that allow feed publishers to release content under more flexible copyright restrictions than previously available. Feed consumers can consult the license to see how they can reuse the content for their own work.

    The element can apply to either the complete channel or the individual item.

    It consists of only one element, creativeCommons:license, which contains the URL of the Creative Commons license on the Creative Commons site. It has the following namespace declaration:

      xmlns:creativeCommons="
      http://backend.userland.com/
    creativeCommonsRssModule"

    In action, it looks like Example 4-5.

    Example 4-5. Part of an RSS 2.0 feed with the Creative Commons module

    <rss version="2.0" xmlns:creativeCommons="http://backend.userland.com/
        creativeCommonsRssModule">

    <channel>
    <title>Creative Commons Example</title> <link>http://www.example.com/</link> <creativeCommons:license>http:// www.creativecommons.org/licenses/by-nd/1.0 </creativeCommons:license>
    ...
    <item>
    <description>blah blah blah</description> <creativeCommons:license>http:// www.creativecommons.org/licenses/by-nc/1.0
     </creativeCommons:license>
    </item>
    ...

    Note that a creativeCommons:license element on an item overrides the same on the channel for that item.

    More details can be found at:

     http://backend.userland.com/creativeCommonsRssModule

    More XML Tutorials Articles
    More By O'Reilly Media

    blog comments powered by Disqus

    XML TUTORIALS ARTICLES

    - Validation with Document Type Definitions (D...
    - Creating a Well-Formed XML Document
    - Getting to Know XML
    - A Friendly Approach to XML
    - Creating RSS 2.0 Feeds
    - Using Modules in Your RSS Feed
    - RSS 2.0
    - Querying XML: Use Cases
    - Joins and Query Use with XML
    - Solving Problems by Querying XML
    - Performing Set Operations When Querying XML
    - Querying XML
    - Handling Data for Ajax with JSON
    - Handling XML Data for Ajax
    - XML and JSON for Ajax


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 11 - Follow our Sitemap