RSS 1.1: RDF Site Summary

Initial Draft: 8th January 2005

Latest version:
http://inamidst.com/rss1.1/
This version:
http://inamidst.com/rss1.1/index
Authors:
Sean B. Palmer (sean+rss@infomesh.net)
Christopher Schmidt (crschmidt@crschmidt.net)

This work is licensed under a Creative Commons License.


Abstract

RSS 1.1 is a content syndication format intended to update and replace the popular RSS 1.0. It is an application of the W3C's RDF and XML languages, and utilizes more up-to-date facilities thereof than does RSS 1.0. RSS 1.1 is as extensible as RSS 1.0 and can even make use of is extension modules; it is also entirely backwards compatible with that language and its parsers.

Status

This is an independent draft not supported or endorsed in any way by the RSS-Dev Working Group or any other organization. This work is licensed by its authors under a Creative Commons License, by-nc-nd v2.0 or later. Please send any comments about this work, or corrections, directly to the author. Public discussion of the issues surrounding RSS in general can be had on the rss-dev mailing list.

Table of Contents

Or skip to section one.


1. Introduction and Background

RSS 1.1 is an extensible content syndication format based on RDF and XML. It allows content distributors such as news portals, webloggers, and other providers of up-to-the-minute content to publish their information in a machine readable and repurposable format. In its other guises, e.g. RSS 0.92, RSS 2.0, and Atom, content syndication of this kind has been enormously successful, and no longer needs justification of its general potential.

The addition of yet another version, however, to the current proliferation of RSS variants needs its rationale exposited. This specification is made available by users of the RSS 1.0 format who wanted to update the specification to make use of the latest features of RDF in order to reduce the redundancy in the format, whilst at the same time not only maintaining the backwards compatibility with tools that RSS 1.0 has, but implementing a series of bugfixes from the lessons learned in developing the other descendent of RSS 1.0, Atom.

In sum, RSS 1.1 is to be considered a bugfix and streamline release of RSS 1.0 for users of RSS 1.0 who do not want to migrate to Atom.

@@ Mention that RSS 1.0 extension modules can be used with RSS 1.1. Note the changes in Appendix B. @@ Internationalization as a benefit.

2. Motivation

@@ These introductory paragraphs need careful rewriting: for example, the Abstract should mention backwards compatibility and extensiblity too.

Many sites understand the benefits of syndication, and have provided RSS feeds to achieve a variety of goals, from increased readership to providing up-to-date updates on content. A number of formats have emerged, each of them offering aspects that others do not. RSS 1.0, due to its RDF based nature, offers a number of benefits. Thus far, however, uptake for RSS 1.0 has been relatively limited, due to the difficulty in creating conforming documents in comparison to other syndication formats. Duplication of data, as well as a generally confusing specification, have left much to be desired from the developer perspective, leading to a less-than-impressive number of RDF-based RSS documents in the wild.

@@ More.

3. Conformance Definition

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

A fully conformant RSS 1.1 document is one which syntactically matches the start production of the RELAX NG schema in section 5., and which meets all of the normative requirements of sections 3., 4., 5., and 6. of this specification. The list of requirements includes the semantic consistency of any RSS 1.1 extensions to the RDF Schema and OWL Ontology in section 6.

Here is an example of an RSS 1.1 document:

<Channel xmlns="http://purl.org/net/rss1.1#" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
   rdf:about="http://www.xml.com/xml/news.rss">
<title>XML.com</title>
<link>http://xml.com/pub</link>
<description>
   XML.com features a rich mix of information and services
   for the XML community.
</description>
<image rdf:parseType="Resource">
   <title>XML.com</title>
   <link>http://www.xml.com/</link>
   <url>http://xml.com/universal/images/xml_tiny.gif</url>
</image>
<items rdf:parseType="Collection">
   <item rdf:about="http://www.xml.com/pub/a/2005/01/05/restful.html">
      <title>The Restful Web: Amazon's Simple Queue Service</title>
      <link>http://www.xml.com/pub/a/2005/01/05/restful.html</link>
      <description>
         In Joe Gregorio's latest Restful Web column, he explains that 
         Amazon's Simple Queue Service, a web service offering a queue 
         for reliable storage of transient messages, isn't as RESTful as 
         it claims.
      </description>
   </item>
   <item rdf:about="http://www.xml.com/pub/a/2005/01/05/tr-xml.html">
      <title>Transforming XML: Extending XSLT with EXSLT</title>
      <link>http://www.xml.com/pub/a/2005/01/05/tr-xml.html</link>
      <description>
         In this month's Transforming XML column, Bob DuCharme reports 
         happily that the promise of XSLT extensibility via EXSLT has become 
         a reality.
      </description>
   </item>
</items>
</Channel>

This example is also available as a standalone document: example.rss.

4. Syntax and Semantics

RSS 1.1 documents SHOULD be served with the MIME type "application/rss+xml", and MAY be served with the MIME type "application/rdf+xml". The character encoding of RSS 1.1 document MUST be utf-8 (hence US-ASCII is also acceptable). @@ What about utf-16?

The prose definition of RSS 1.1 is annotated with fragments of a RELAX NG Compact schema, the full version of which can be found in section 5. The root element of every RSS 1.1 document MUST be an instance of the RDF production (section 7.2.11) of the RDF/XML Syntax Specification. RSS 1.1 documents are therefore conformant RDF/XML documents per section 5.5 ibid., and have a semantic per both section 6 ibid. and the RSS 1.1 RDFS/OWL Schema in section 6.0 of this specification.

It is RECOMMENDED that RSS 1.1 documents contain an XML prolog, for backwards compatibility with RSS 0.9. The value of this may be, for example:

<?xml version="1.0"?>

@@ Value of rdf:about must be unique, a la XML ID.

4.1 Namespaces

default namespace rss = "http://purl.org/net/rss1.1#"
namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"

Syntax: The RSS 1.1 namespace and RDF namespaces must be declared on the root element of each RSS 1.1 document. The RSS 1.1 namespace is "http://purl.org/net/rss1.1#" and the RDF namespace is "http://www.w3.org/1999/02/22-rdf-syntax-ns#".

4.2 <channel> Element (document root)

start = Channel

Channel = element Channel {
   AttrXMLLang?, AttrRDFAbout,
   (title & link & description & image? & Any & items)
}

Any = element * - ( rss:* ) {
   attribute * - ( rss:* ) { text }*,
   mixed { Any* }
}*

AttrXMLLang = attribute xml:lang { xsd:language }
AttrRDFAbout = attribute rdf:about { xsd:anyURI }

Syntax: The "Channel" element is the root element of an RSS 1.1 document, upon which you must declare the namespaces given in section 4.1. The "Channel" element must have an rdf:about attribute, the value of which must be an instance of the XSD anyURI datatype. Optionally, it may have an xml:lang attribute, the value of which must be an instance of the XSD language datatype. The content of the "Channel" element must be a sequence of title element, link element, description element, optional image element, zero or more elements defined in the Any section, and items element, in any order.

Usage notes: Though any namespace prefixes may be used, in any configuration that is syntactically valid according to the schema in section 6., it is RECOMMENDED that the RSS 1.1 namespace use the empty prefix and RDF use the "rdf" prefix throughout, for backwards compatability with RSS 0.9x. The rdf:about attribute provides the URI that identifies the channel. It must not be the same as any of the URIs used for any of the other things in an RSS 1.1 document, e.g. Items and Images. The URI identifying a channel is often that used for either the homepage of the content provider, or for the feed itself.

4.3 <title> Element

title = element title {
   AttrXMLLang?, text
}

AttrXMLLang = attribute xml:lang { xsd:language }

Syntax: The "title" element may optionally have an xml:lang attribute, the value of which must be an instance of the XSD language datatype. The "title" element's content must be #PCDATA. @@ is RELAX NG text really #PCDATA?

Semantics: This provides the human readable title for Channels, Images, and Items. It is synonymous with the Dublic Core title element, and XHTML title.

Usage notes: An aggregator may wish to map, for example, a Channel's title element onto xhtml:title, an Image's title element onto xhtml:img/@alt, and an Item's title element onto xhtml:h2.

link = element link { xsd:anyURI }

Syntax: The "link" element must have as its content text that is an an instance of the XSD anyURI datatype.

Usage notes: To be backwards compatible with RSS 0.91, and to meet a requirement of RSS 1.0, the use of the "http:", "https:", and "ftp:" URI schemes RECOMMENDED as the only acceptable as content values of this element. When used as a child of the Channel or item elements, the value of link is often the same as the parent's rdf:about attribute, if present.

@@ When link is a child of image.

4.5 <description> Element

description = element description {
   AttrXMLLang?, text
}

AttrXMLLang = attribute xml:lang { xsd:language }

Syntax: The "description" element may optionally have an xml:lang attribute, the value of which must be an instance of the XSD language datatype. The "description" element's content must be text.

4.6 <image> Element

image = element image {
   AttrXMLLang?, AttrRDFResource, 
   (title & link? & url & Any)
}

Any = element * - ( rss:* ) {
   attribute * - ( rss:* ) { text }*,
   mixed { Any* }
}*

AttrXMLLang = attribute xml:lang { xsd:language }
AttrRDFResource = attribute rdf:parseType { "Resource" }

Syntax: The "image" element must have an rdf:parseType attribute with its value set to "Resource", and may optionally have an xml:lang attribute the value of which must be an instance of the XSD language datatype. The "image" element's content must be a sequence of title element, optional link element, url element, and zero or more elements defined in the Any section, in any order.

Usage notes: Any images are RECOMMENDED to be of a well-known image format such as GIF, JPG, or PNG. Since RSS 0.9 requires that images be 88x31 in size and RSS 0.91 requires that they be {1-144}x{1-400} in size, these sizes are RECOMMENDED.

4.7 <url> Element

url = element url { xsd:anyURI }

Syntax: The "url" element must have as its content text that is an instance of the XSD anyURI datatype.

Semantics: The value of this element is the URI of the image itself. Note that this is distinct from the link element, which is to be the URI of the Channel, and not the image.

Usage notes: To be backwards compatible with RSS 0.91, and to meet a requirement of RSS 1.0, the use of the "http:", "https:", and "ftp:" URI schemes RECOMMENDED as the only acceptable as content values of this element.

@@ Why does an image have a link and a url? Sigh.

4.8 <items> Element

items = element items {
   AttrXMLLang?, AttrRDFOrder,
   item*
}

AttrXMLLang = attribute xml:lang { xsd:language }
AttrRDFOrder = attribute rdf:parseType { "Collection" | "Resource" }

Syntax: The "items" element must have an rdf:parseType element with a value of either "Collection" or "Resource", and may optionally have an xml:lang attribute the value of which must be an instance of the XSD language datatype. The "items" element must have as its content zero or more instance of the item element.

Semantics: The items element is the relationship between a Channel instance and an ordered collection of item instances, i.e. associating a list of items with a particular channel. Though the order of the child elements is significant, user agents may want to order items based on other attributes such as last modified dates provided by an extensions module.

Usage notes: The value of rdf:parseType may be either Collection or Resource. Collection means that the order of the items in the feed is significant, i.e. that it's an ordered list, and is roughly analogous to <ol> in HTML. Resource means the opposite—that the order of items is insignificant, and that it's an unordered list like <ul> in HTML.

There are a number of reasons why you should prefer one over the other. When Collection is used, the RDF triples that result are more verbose, and less compatible with existing RDF Query Languages, though this may change in the near future. Specifically, it is difficult to query for arbitrary items, whereas this operation is easier in most RDF APIs. When Resource is used, it is impossible to ascertain the order of the items from the triples alone, and therefore other metadata such as dc:date are not used. If no other metadata are available or the user agent doesn't support them, then the items will not be able to be displayed in a particular order. Note also that DOM-based RSS parsers may take item order to be significant, whereas with Resource this is not necessarily so, and therefore producers using Resource should be aware that if they want to be compatibile with such parsers, they SHOULD maintain correct ordering in the document.

The use cases considered in the design of this feature are as follows:

4.9 <item> Element

item = element item {
   AttrXMLLang?, AttrRDFAbout?,
   (title & link & description? & image? & Any)
}

Any = element * - ( rss:* ) {
   attribute * - ( rss:* ) { text }*,
   mixed { Any* }
}*

AttrXMLLang = attribute xml:lang { xsd:language }
AttrRDFAbout = attribute rdf:about { xsd:anyURI }

Syntax: The "item" element may optionally have an rdf:about attribute the value of which must be an instance of the XSD anyURI, and optionally an xml:lang attribute the value of which must be an instance of the XSD language datatype. The content of the "item" element must be a sequence of title element, link element, optionally a description element, and zero or more elements defined in the Any section, in any order.

Semantics: The value of the rdf:about attribute, if present, must uniquely identify the item. An item is a discrete content instance, the exact nature of which is up to the provider: examples include weblog posts, recipies, sports events, news items, and specification updates.

Usage notes: for backwards compatability with RSS 0.9x, a maximum cardinality of fifteen item elements per RSS 1.1 document is RECOMMENDED.

4.10 Any

Any = element * - ( rss:* ) {
   attribute * - ( rss:* ) { text }*,
   mixed { Any* }
}*

Syntax: Any number of elements from outside the RSS namespace, with any number of attributes from outside the RSS namespace, and with mixed content of the same (recursively). Added requirement: the root of every Any section, viz. those which are not nested inside an Any section, MUST be a conforming instance of the propertyElt production of section 7.2.14 of the RDF/XML Syntax Specification.

Usage notes: For backwards compatability with RSS 0.9x tools it is RECOMMENDED that elements are not repeated as siblings in Any sections. This is due to those tools mapping these values to a hashtable and hence only taking the last usage of an element as significant. Reference: IssueRepeatingElementsHindersRdf.

5. RELAX NG Compact Schema

The following is the normative schema for RSS 1.1 using the RELAX NG Compact format:

# RELAX NG Compact Schema for RSS 1.1
# Sean B. Palmer, inamidst.com
# Christopher Schmidt, crschmidt.net

# @@ Annotations.

default namespace rss = "http://purl.org/net/rss1.1#"
namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"

start = Channel

Channel = element Channel {
   AttrXMLLang?, AttrRDFAbout, 
   (title & link & description & image? & Any & items)
}

title = element title { 
   AttrXMLLang?, text 
}

link = element link { xsd:anyURI }

description = element description { 
   AttrXMLLang?, text 
}

image = element image {
   AttrXMLLang?, AttrRDFResource,
   (title & link? & url & Any)
}

url = element url { xsd:anyURI }

items = element items { 
   AttrXMLLang?, AttrRDFOrder, 
   item*
}

item = element item { 
   AttrXMLLang?, AttrRDFAbout?, 
   (title & link & description? & image? & Any)
}

Any = element * - ( rss:* ) {
   attribute * - ( rss:* ) { text }*, 
   mixed { Any* }  
}*

AttrXMLLang = attribute xml:lang { xsd:language }
AttrRDFAbout = attribute rdf:about { xsd:anyURI }
AttrRDFResource = attribute rdf:parseType { "Resource" }
AttrRDFOrder = attribute rdf:parseType { "Collection" | "Resource" }

This schema is also available as a standalone document: schema.rnc.

6. Turtle RDF Schema & OWL Ontology

The following is the normative RDF Schema for RSS 1.1 in the Turtle serialization of RDF, including OWL information that makes the following an OWL Lite ontology:

@prefix : <http://purl.org/net/rss1.1#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

<> rdf:type owl:Ontology .

:Channel rdf:type owl:Class; 
   rdfs:label "Channel"; 
   rdfs:subClassOf 
     [ rdf:type owl:Restriction; owl:cardinality "1"; 
       owl:onProperty :title; owl:allValuesFrom rdfs:Literal ], 

     [ rdf:type owl:Restriction; owl:cardinality "1"; 
       owl:onProperty :link; owl:allValuesFrom :URI ], 

     [ rdf:type owl:Restriction; owl:cardinality "1"; 
       owl:onProperty :description; owl:allValuesFrom rdfs:Literal ], 

     [ rdf:type owl:Restriction; 
       owl:onProperty :image; owl:allValuesFrom :Image ], 

     [ rdf:type owl:Restriction; owl:cardinality "1"; 
       owl:onProperty :items; owl:allValuesFrom :Items ] .

:title rdf:type rdf:Property; 
   rdfs:label "title" .

:link rdf:type rdf:Property; 
   rdfs:label "link" .

:description rdf:type rdf:Property; 
   rdfs:label "description" .

:Image rdf:type owl:Class; 
   rdfs:label "Image"; 
   rdfs:comment "Never syntactically appears as an element."; 
   rdfs:subClassOf 
     [ rdf:type owl:Restriction; owl:cardinality "1"; 
       owl:onProperty :title; owl:allValuesFrom rdfs:Literal ], 

     [ rdf:type owl:Restriction; owl:cardinality "1"; 
       owl:onProperty :link; owl:allValuesFrom :URI ], 

     [ rdf:type owl:Restriction; owl:cardinality "1"; 
       owl:onProperty :url; owl:allValuesFrom :URI ] .

:url rdf:type rdf:Property; 
   rdfs:label "url" .

:Items rdf:type owl:Class; 
   # @@ What is rdf:List an instance of?
   # Can Items be derived in this way?
   rdfs:comment "Never syntactically appears as an element."; 
   rdfs:subClassOf rdf:List, 
     # @@ rdf:member?
     [ rdf:type owl:Restriction; 
       owl:onProperty rdf:member; owl:allValuesFrom :Item ] .

:item rdf:type owl:Class; 
   rdfs:label "item" .

:URI rdf:type rdfs:Class; 
   rdfs:subClassOf rdfs:Literal .

This schema is also available as standalone documents in the following formats: Turtle: ont.n3; RDF/XML (informative): ont.rdf.

Appendix A: References

[OWL]
OWL Web Ontology Language Overview, McGuinness, D. L., van Harmelen, F. (2004-02-10).
W3C Recommendation. World Wide Web Consortium.
Available from http://www.w3.org/TR/owl-features/
[RDF]
RDF/XML Syntax Specification (Revised), Beckett, D. (2004-02-10).
W3C Recommendation. World Wide Web Consortium.
Available from http://www.w3.org/TR/rdf-syntax-grammar/
[RELAX-NG]
RELAX NG Compact Syntax, Clark, J. (2002-11-21).
OASIS Committee Specification. OASIS.
Available from http://www.oasis-open.org/committees/relax-ng/compact-20021121.html
[RFC-2119]
Key words for use in RFCs to Indicate Requirement Levels, Bradner, S., (1997-03).
IETF Request For Comments. Internet Engineering Task Force.
Available from http://www.ietf.org/rfc/rfc2119.txt
[RSS-1.0]
RDF Site Summary (RSS) 1.0, Beged-Dov, G. et al. (2000-12-06).
RSS-Dev Working Group.
Available from http://purl.org/rss/1.0/spec
[TURTLE]
Turtle - Terse RDF Triple Language, Beckett, D. (2004-12-23).
Institute for Learning and Research Technology.
Available from http://www.ilrt.bris.ac.uk/discovery/2004/01/turtle/
[XML]
Extensible Markup Language (XML) 1.0 (Third Edition), Bray, T. et al. (2004-02-04).
W3C Recommendation. World Wide Web Consortium.
Available from http://www.w3.org/TR/REC-xml/
[XSD]
XML Schema Part 2: Datatypes Second Edition, Biron, P. V., Malhotra, A. (2004-10-28).
W3C Recommendation. World Wide Web Consortium.
Available from http://www.w3.org/TR/xmlschema-2/

Appendix B: Changes From RSS 1.0

Appendix C: Acknowledgements

Thanks to Cody Woodard for early review comments, architectural suggestions, and the logo.

This work is a furthering of that carried out by the RSS-Dev Working Group; the authors of the RSS 1.0 specification. They are as follows:


Sean B. Palmer, Christopher Schmidt

Creative Commons License This work is licensed under a Creative Commons License.