RSS 1.1: RDF Site Summary

Initial Draft: 9th 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. It has better internationalization support, utilizes more up-to-date facilities of its consistent languages than RSS 1.0, and fixes a number of other issues with the RSS 1.0 specification. RSS 1.1 is as extensible as RSS 1.0 and can even make use of its extension modules.

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 authors. 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.

An example of a valid RSS 1.1 document is given in section 3.

@@ More.

2. Motivation

In its other guises, e.g. RSS 0.92, RSS 2.0, and Atom, content syndication of this kind has been enormously successful, and requires no justification of its general potential. The addition of yet another version, however, to the current proliferation of RSS variants needs its rationale exposited.

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.

This specification is therefore 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 implementing a series of bugfixes from the lessons learned in developing the other descendent of RSS 1.0, Atom.

Hence 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. A full list of changes from RSS 1.0 is given in Appendix B.

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.

Usage note: Any RSS 1.0 extension module may be employed in an RSS 1.1 document as long as it is done in such a way as to comply with the conformance requirements in this section.

4. Syntax and Semantics

RSS 1.1 documents SHOULD be served with a media type of "application/rss+xml", and MAY be served with a media type of "application/rdf+xml". User agents SHOULD NOT reject other values. The character encoding of RSS 1.1 document MUST be either UTF-8, UTF-16, or UTF-32 per requirement C018 of the Character Model for the WWW. Since US-ASCII is a subset of UTF-8, users MAY use US-ASCII as the encoding for RSS 1.1 documents. An explicit charset parameter MUST be used when serving an RSS 1.1 document as anything other than US-ASCII.

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.

RSS 1.1 documents encoded as UTF-32 MUST begin with an XML prolog containing an encoding declaration, unless the encoding is determinable by a higher-level protocol (e.g. through use of a charset parameter in the MIME Content-Type header). All other RSS 1.1 documents are RECOMMENDED to contain an XML prolog for backwards compatibility with RSS 0.9. For the example of a UTF-8 encoded document, the value of this may be:

<?xml version="1.0"?>

For backwards compatibility with RSS 1.0, the value of each rdf:about attribute in an RSS 1.1 document MUST be unique; i.e. an rdf:about attribute MUST NOT appear twice in the same document with the same value. Conceptually, the rdf:about attribute may be thought of as having the same constraint as XML IDs, only the range of allowed values is that of the XSD anyURI datatype. See the usage notes for the item element for more information.

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 text.

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, it is RECOMMENDED that only URIs with the scheme "http:", "https:", or "ftp:" be used as the content value of this element.

When used as a child of the Channel or image elements, the value of link is usually, but not always, the same as Channel's rdf:about attribute. Note that it is the url element that provides a source for an image, not the link element. When used as the child of an item element, the value of link is usually, but not always, the same as the item's rdf:about attribute, if it is present.

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.

Usage notes: User agents MUST NOT interpret the content of the "description" element as encoded HTML; viz. "&lt;em&gt;this is a description&lt;/em&gt;" is not to be converted to "<em>this is a description</em>" by the client. The RSS 1.0 Content Module SHOULD instead be used for this purpose.

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, it is RECOMMENDED that only URIs with the scheme "http:", "https:", or "ftp:" be used as the content value of this element.

4.8 <items> Element

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

AttrXMLLang = attribute xml:lang { xsd:language }
AttrRDFCollection = attribute rdf:parseType { "Collection" }

Syntax: The "items" element must have an rdf:parseType element with a value of "Collection", 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.

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.

The value of each rdf:about attribute MUST be unique to the document, per the requirement in section 4. This is to ensure that there are no duplicate items in the resulting RDF graph, and hence that items are not merged together. Since the rdf:about attribute is optional on the item element, content producers that cannot ensure the production of unique rdf:about values MAY omit the attribute altogether. Technically, the unique value will then be generated by an RDF parser in the form of a blank node. This constraint also ensures that channels do not appear within themselves, and that there is no conflation of channels and items.

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?, AttrRDFCollection, 
   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" }
AttrRDFCollection = attribute rdf:parseType { "Collection" }

This schema is also available as standalone documents in the following formats: RELAX NG Compact: schema.rnc; RELAX NG XML (informative): schema.rng.

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 Full 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: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 rdf:Property; 
   rdfs:label "items" .

:Items rdf:type owl:Class; 
   rdfs:label "Items"; 
   rdfs:comment "Never syntactically appears as an element."; 
   rdfs:subClassOf rdf:List, 
     [ rdf:type owl:Restriction; 
       owl:onProperty rdfs:member; owl:allValuesFrom :item ] .

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

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

@@ Cody: "Are you going to do any owl:sameAs or owl:equivalentPropertys on the rss1.1 class/properties?"

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

Appendix A: References

[CHARMOD]
Character Model for the World Wide Web 1.0: Fundamentals, DÜrst, M. et al. (2004-11-22).
W3C Proposed Recommendation. World Wide Web Consortium.
Available from http://www.w3.org/TR/charmod/
[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-2046]
Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types, Freed, N., Borenstein, N., (1996-11).
IETF Request For Comments. Internet Engineering Task Force.
Available from http://www.ietf.org/rfc/rfc2046.txt
[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; and to Joe Geldart for comments on the OWL species of the RSS 1.1 ontology.

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.