XML Tutorials

  Home arrow XML Tutorials arrow Page 3 - 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 - Simple Semantic Resolution Module


    (Page 3 of 4 )

    One of the never-ending arguments within the RSS world is that between the pro-and anti-RDF camps. The fork between RSS 0.91 and 1.0 was almost entirely caused by this disagreement. The pro-RDF camp stated, quite rightly, that RDF data has a great deal more meaningful utility than plain XML, whilst the anti-RDF camp stated, also quite rightly, that the RDF syntax was horrible, and that no one can understand it without reading the documentation and having a nice lie down.

    That may be--we'll find out your own feelings on this in the next chapters--but in the meantime, the Simple Semantic Resolution module was one idea put forward to bridge the divide between the two cultures.

    Written by Danny Ayers, its presence in an RSS 2.0 feed simply means "this data should be considered RDF, and to use it with an RDF-compatible application you should apply this transformation to it first." Whereupon, it points you to a nice XSLT stylesheet. That stylesheet consists of one single element, a subelement of channel, and has the following namespace declaration:

      xmlns:ssr="http://purl.org/stuff/ssr"

    The element is:

    ssr:rdf

    It's empty, but contains a single attribute, transform, which is equal to the URL of the necessary stylesheet:

      <ssr:rdf transform="http://w3future.com/weblog/gems/ rss2rdf.xsl" />

    Example 4-6 shows the SSR module in use.

    Example 4-6. Part of an RSS 2.0 feed with the SSR module

    <?xml version="1.0"?>
    <rss version="2.0" xmlns:ssr="http://purl.org/stuff/ssr"> <ssr:rdf transform="http://w3future.com/weblog/gems/ rss2rdf.xsl" />
    ...

    More details can be found at http://ideagraph.net/xmlns/ssr/.

    Trackback Module

    The trackback system for weblog content management systems (see
    http://www.movabletype.org/docs/mttrackback.html for the technical details) has grown up in the same neighborhood as RSS, so it's only fair that the one should be represented in the other.

    This module, also available in tasty RSS 1.0, comes from Justin Klubnik and allows RSS 2.0 feeds to display both the URL that people should trackback to, but also the URL that the item has trackbacked itself. The idea is that aggregators can send pings and also follow links to find related pages, because items might ping places they don't explicitly link to.

    This module is made up of two elements, subelements of item, and has the following namespace declaration:

      xmlns:trackback="http://madskills.com/ public/xml/rss/module/trackback/"

    Here are the elements:

    trackback:ping

    This contains the item's trackback URL:

      <trackback:ping>http://foo.com/ trackback/
    tb.cgi?tb_id=20020923</trackback:ping>

    trackback:about

    This contains any trackback URL that was pinged in reference to the item:

      <trackback:about>http://foo.com/ trackback/tb.cgi?tb_id=20020923</trackback:about>

    More details can be found at http://madskills.com/public/xml/rss/module/trackback/.

    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 1 - Follow our Sitemap