Copyright © 2002 Joe Gregorio
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.
This is a rough draft.
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.
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/".
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.
The RSS 0.91 introduces the required elements of the 'channel' element in the following table:
| Element | Description | XHTML Equivalent |
|---|---|---|
| description | A plain text description of the channel. | Can be handled by a <meta> element in the <head> of a document. |
| langage | Specifies the language of a channel. | Specified in XHTML as an attribute of <html>. |
| link | This 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> |
| title | An 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:
| Element | Description | XHTML Equivalent |
|---|---|---|
| copyright | Copyright notice. | Can be handled by a <meta> element in the <head> of a document. |
| docs | This tag should contain a URL that references a description of the channel. | |
| image | ||
| item | See the next table for 'item' elements. | |
| lastBuildDate | Can be handled by a <meta> element in the <head> of a document. | |
| managingEditor | Can be handled by a <meta> element in the <head> of a document. | |
| pubDate | Can be handled by a <meta> element in the <head> of a document. | |
| rating | PICS | |
| skipDays | ||
| skipHours | ||
| textinput | Form elements are part of XHTML. | |
| webMaster | Can 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:
| Element | Description | XHTML Equivalent |
|---|---|---|
| title | An identifying string for a resource. | |
| link | This 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. | |
| description | A 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.
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:
| Element | Description | Allowed Values |
|---|---|---|
| syn:item | Marks the beginning of a new item. | The empty string is the only allowed value. |
| syn:title | The 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:link | This 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:description | A 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>
</span>
</div>
</div>