XHTML Syndication Module

Note 19 July 2002

This version:
http://bitworking.org/XHTML-Syndication-20020719.html
Latest version:
http://bitworking.org/XHTML-Syndication-20020719.html
Authors:
Joe Gregorio

Abstract

This document is meant to document the Syndication module for XHTML. This module defines a namespace and arttibutes that live in that namespace that allow an XHTML web page to be syndicated.

Status of this document

This is a rough draft.

Motivation

The motivation for this document is to do away with RSS as a seperate file format. If web publishers and CMSs want to participate in content syndication then they have to produce two versions of their front page, the HTML version and the RSS version. A careful inspection of XHTML and common web practice shows that most of the information need to do syndication already exists in web pages published today. What is needed is a little extra information to make syndication possible.

Notational Conventions

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALLNOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC2119 [KEYWORDS].

Namespace URIs of the general form "some-URI" represent some application-dependent or context-dependent URI as defined in RFC2396 [URI]. The namespace prefixes "syn" used in this document is associated with the namespaces "http://www.somestandard.org/2002/Syndication/".

Table of Contents

1 Introduction
2 RSS 0.91 Elements
3 Syndication
4 Analysis/Examples
5 References

1. Introduction

A good primer on RSS is this http://gils.utah.gov/rss/ in the Utah Government Information Locator Service. The history of RSS is documented here.

The motivation for this document allow for the requirement that syndication requires a seperate file with it's own format. If web publishers and CMS's want to participate in content syndication then they have to produce two versions of their front page, the HTML version and the RSS version. A careful inspection of XHTML and common web practice shows that most of the information need to do syndication already exists in web pages published today. What is needed is a little extra information to make syndication possible.

RSS 0.91 will be used as the subject of comparison for this specification. Since much of the information in and RSS feeds already exists in HTML Section 2 deals with mapping RSS 0.91 elements to XHTML elements or constructs. Section 3 covers the missing information in XHTML needed for Syndication and introduces the "syn" namespace, including examples. Section 4 does a little analysis of current web page design and shows how these elements can be put to use.

2. RSS 0.91 Elements

The RSS 0.91 introduces the required elements of the 'channel' element in the following table:

ElementDescriptionXHTML Equivalent
descriptionA plain text description of the channel.Can be handled by a <meta> element in the <head> of a document.
langageSpecifies the language of a channel.Specified in XHTML as an attribute of <html>.
linkThis is a URL that a user is expected to click on, as opposed to a URL that is for loading a resource, such as an image.Redundant, this is the link. Unless there really is a seperate browser viewable page, in that case refer to it with a <link rel="alternate" /> element in the <head>
titleAn identifying string for a resource. When used in a channel, this is the channel's title. Take the title in the <head>.

The optional elements of the 'channel' element are in the following table:

ElementDescriptionXHTML Equivalent
copyrightCopyright notice.Can be handled by a <meta> element in the <head> of a document.
docsThis tag should contain a URL that references a description of the channel.
image
itemSee the next table for 'item' elements.
lastBuildDateCan be handled by a <meta> element in the <head> of a document.
managingEditorCan be handled by a <meta> element in the <head> of a document.
pubDateCan be handled by a <meta> element in the <head> of a document.
ratingPICS
skipDays
skipHours
textinputForm elements are part of XHTML.
webMasterCan be handled by a <meta> element in the <head> of a document.

The RSS 0.91 introduces the elements of the 'item' element in the following table:

ElementDescriptionXHTML Equivalent
titleAn identifying string for a resource.
linkThis is a URL that a user is expected to click on, as opposed to a URL that is for loading a resource, such as an image.
descriptionA plain text description of the channel.

As demonstrated in the above tables many of the elements in an RSS 0.91 feed map directly into XHTML elements or constructs. The next section covers a new module to handle the 'item' element and it's children. For now well skip 'docs', 'image', 'skipDays' and 'skipHours' elements.

3. Syndication

The 'item' element and its children 'title', 'link' and 'description' have no natural mappings in XHTML, so the "syn" namespace provides a minimal set of extra markup to enable syndication. In the "syn" namespace the following attributes are declared:

ElementDescriptionAllowed Values
syn:itemMarks the beginning of a new item.The empty string is the only allowed value.
syn:titleThe title of the item.The empty string if the element contains the title as it's value. "none" for no title. Any other non-empty value is taken as the item title.
syn:linkThis is a URL that a user is expected to click on.The empty string if this element contains the link as it's value. "href" if this element contains the link in it's href attribute. Any other non-empty value of the attribute is taken as the URL.
syn:descriptionA plain text description of the channel.The empty string if the element contains the description as it's value. "none" for no description. Any other non-empty value is taken as the item description.

Here is an example of how a story could be marked up. Note that this is just an example of the above "syn" attributes. Examples in the next section will show a complete document marked up with the relavent XHTML element highlighted.

    <div class="singleItem" syn:item="">
        <h4><a syn:title="" syn:link="href" href="http://bitworking.org/2002/07/18.html#a245" 
                class="weblogItemTitle">Bye-bye BurningBird</a></h4>
        <p class="firstItemParagraph" syn:description="">
           Hard to believe but <a href="http://weblog.burningbird.net/archives/000370.php">BurningBird</a>
           is closing down her blog. Best of wishes Shelly.</p>
        <div class="singleItemFooter">
            <span class="itemPermaLinkTime">12:21:21 AM  
                <span class="itemPermaLink"><a href="2002/07/18.html#a245">#</a>
                </span>&nbsp;&nbsp;
            </span>
        </div>
    </div> 

4. Analysis/Examples

TBD

5. References

[KEYWORDS]
S. Bradner, "Key words for use in RFCs to Indicate Requirement Levels," RFC 2119, Harvard University, March 1997
[URI]
T. Berners-Lee, R. Fielding, L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax," RFC 2396, MIT/LCS, U.C. Irvine, Xerox Corporation, August 1998.
[XML-ns]
W3C Recommendation, "Namespaces in XML," 14 January 1999.
[RFC2822]
IETF Request for Comments, (Obsoletes 822) "RFC2822 ," April 2001.
[xml-1]
W3C Recommendation "Extensible Markup Language (XML) 1.0 (Second Edition)," Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, 6 October 2000.