RSS 1.1: RDF Site Summary

Initial Draft: 7th 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:

<rdf:RDF xmlns="http://purl.org/net/rss1.1#" version="1.1" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<channel 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://xml.com/pub/2000/08/09/xslt/xslt.html">
      <title>Processing Inclusions with XSLT</title>
      <link>http://xml.com/pub/2000/08/09/xslt/xslt.html</link>
      <description>
         Processing document inclusions with general XML tools can be
         problematic. This article proposes a way of preserving inclusion
         information through SAX-based processing.
      </description>
   </item>
   <item rdf:about="http://xml.com/pub/2000/08/09/rdfdb/index.html">
      <title>Putting RDF to Work</title>
      <link>http://xml.com/pub/2000/08/09/rdfdb/index.html</link>
      <description>
         Tool and API support for the Resource Description Framework
         is slowly coming of age. Edd Dumbill takes a look at RDFDB,
         one of the most exciting new RDF toolkits.
      </description>
   </item>
</items>
</channel>
</rdf:RDF>

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 Appendix A. 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 <rdf:RDF> Element (document root)

start = RDF

RDF = element rdf:RDF { 
   AttrXMLLang?, AttrVersion, 
   channel
}

AttrXMLLang = attribute xml:lang { xsd:language }
AttrVersion = attribute xml:lang { "1.1" }

Syntax: The "rdf:RDF" element is the root element of an RSS 1.1 document, upon which you must declare the namespaces given in section 4.1; it must have a version attribute, the value of which must be "1.1", and may have an xml:lang attribute, the value of which must be an instance of the XSD language datatype.

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.

4.3 <channel> Element

channel = element channel {
   AttrXMLLang?, AttrRDFAbout,
   title, link, description, Any, 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 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 (@@), zero or more elements defined in the Any section, optional image element (@@), zero or more elements defined in the Any section, and items element (@@).

Usage notes: 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.4 <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.

4.5 <link> Element

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 image elements, the value of link is often the same as Channel's rdf:about attribute, though this is OPTIONAL. 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 often the same as the item's rdf:about attribute, if it is present; this is again OPTIONAL.

4.6 <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.7 <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, link element, url element, and zero or more elements defined in the Any section.

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.8 <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.9 <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.10 <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.

@@ Should we have Any? before image too, for symmetry with channel?

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

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

start = RDF

RDF = element RDF { 
   AttrXMLLang?, AttrVersion, 
   channel
}

channel = element channel {
   AttrXMLLang?, AttrRDFAbout, 
   title, link, description, Any, 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 }
AttrVersion = attribute version { "1.1" }
AttrRDFAbout = attribute rdf:about { xsd:anyURI }
AttrRDFResource = attribute rdf:parseType { "Resource" }
AttrRDFCollection = attribute rdf:parseType { "Collection" }

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: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 and architectural suggestion for this specification.

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.