XML technologies / RSS & Atom / RSS 1.0 and RSS 1.1 / Metadata modules

(Excerpt from "Newsfeeds with RSS and Atom" by Heinz Wittenbrink, published by Galileo Press, 2005)

RSS 1.0 differs from RSS 2.0 and Atom in limiting its vocabulary to the language’s core. It nevertheless matches their expressive power because modules can extend it without restriction.

Three basic modules or core modules were recognised along with the RSS 1.0 vocabulary by the standard’s developers. They belong to the language despite having different namespaces. Many other modules have since been proposed. Modularisation made RSS 1.0 a pioneer among XML vocabularies. Only years later were other XML dialects, such as Scalalable Vector Graphics (SVG) and Synchronized Multimedia Interface Language (SMIL), split into modules.

The XML namespace mechanism is one prerequisite for modularisation, but cannot alone define relationships between vocabularies. Advocates of the Resource Description Format repeatedly argue that RDF can describe these relationships explicitly and generally, whereas without RDF the combined vocabulary’s semantics must be defined separately for each extension. RSS 1.0 has registered modules and also allows ad hoc extensions.

RSS 1.0 allows its basic model to be extended with richer metadata. Extensions should be modular, increasing expressive power without changing the RDF core. The alternative would be to add elements to the RSS core. RSS 1.0 primarily aims to express relationships between elements within one channel or across channels.

RSS 1.0 extension modules can of course also be used with other syndication vocabularies. The Dublin Core module has already been mentioned. Many aggregators support it, including when combined with RSS 2.0. Authors such as Mark Pilgrim recommend this combination because Dublin Core is more precisely defined and richer than its RSS 2.0 equivalents. Dublin Core elements also form a standard now widely used in very different fields.

Combining vocabularies poses specific problems for application developers; unrestricted module use requires, for example, namespace support. When developing Atom, the decision was made not to incorporate Dublin Core elements in their own namespace into the core, simplifying vocabulary use. With Atom and RSS, users need deal with only one XML vocabulary to perform most newsfeed-related tasks.

Compared with extending the core, modularising RSS 1.0 offers these advantages:

Binding modules to namespaces

Whereas RSS 2.0 merely permits extension modules in their own namespaces, RSS lays down rules for module developers. Explicit extension procedures do not exclude ad hoc extensions, which must also use namespaces.

Each RSS 1.0 module is a self-contained (compartmentalized) extension bound to its own namespace. Standardised and proposed modules are distinguished, but only the Dublin Core, syndication and content modules were standardised. These modules give RSS 1.0 greater functionality than RSS 2.0 and its predecessors, but also make it considerably more complex.

Specification documents

Each module has its own specification at the URI "http://purl.org/rss/1.0/modules/". Modules should bundle related functions and be defined as narrowly as possible without excluding inseparable related tasks. The principle is that many small, focused modules are easier to use and manage than a few large ones. The specification explicitly permits both simple and "rich" content models. In simple models, elements contain text but no further XML elements.

In the current Dublin Core module, author and category elements contain a simple string, for example <dc:creator>Arthur Autor</dc:creator>. Such extensions are property elements. They represent properties with literal values. A future or alternative version could replace the literal with a description defined in a separate person-description module, for example:

<dc:creator>
   <pd:persdes rdf:about="http://www.example.com/authors/ArthurAutor>
      <pd:firstname>Arthur</pd:firstname>
      <pd:lastname>Arthur Autor</pd:lastname>
      <pd:email>arthur@author.com</pd:email>
   <pd:persdes>
</dc:creator> 

Code example: a resource as the value of dc:creator

 

RDF compatibility of extensions

RSS 1.0 modules should allow an RDF parser to incorporate compliant XML fragments into the graph built while parsing a document. If a module produces XML that cannot be interpreted as RDF, XML parsers with the attribute parseType="literal" should be instructed to treat it as a single value. The content of an element with the attribute parseType with the value literal is interpreted like the literals already introduced, for example as values of title and description. An RDF parser does not analyse markup inside such content further, although an XML parser does. parseType="literal" thus provides a way to prevent certain XML fragments in an XML/RDF document from being interpreted as RDF. This only works if the fragment to be treated as a literal is a property value: RDF graphs allow literals only as objects.

Ordinary XML can be interpreted as RDF, as we have seen. You can therefore write RDF without knowing it, like Monsieur Jourdain speaking prose unknowingly in Molière’s comedy "The Bourgeois Gentleman". The condition is that a first-level element can be interpreted as a resource (node), a second-level element as a property (edge), and its content as the property’s value (another node or a literal).

As we have seen, this technique is also called striping. Recalling the sections on blank nodes, you can see that a parser finds anonymous nodes in such a "striped" document whenever they are not assigned a URI through the attribute rdf:about. (For Striped Syntax and blank nodes, see Document structure as a consequence of the RDF model.)

   

 

 

 

Creative Commons license
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

back to top