Internet technology hosted by Berkman Center

Top-level namespaces

An RSS 2.0 feed's top-level element -- its <rss> tag -- does not belong to any URI-identified namespace. (Technically, it belongs to the "empty namespace.") However, elements contained at any level within an RSS 2.0 feed can belong to other namespaces. That's the mechanism for extending RSS 2.0's core vocabulary.

There are really two different issues with respect to RSS and namespaces: a) modular extension, and b) embedding. Since the advent of RSS 2.0 in 2002, it has been possible to extend RSS in a modular way. For example, elements belonging to the XHTML namespace, identified by the URI "," or the Dublin Core (standard metadata) namespace, identified by the URI "," can be used to extend RSS 2.0 feeds.

What RSS 2.0 feeds can't do, lacking a top-level namespace declaration, is embed directly in other XML vocabularies. For that scenario to work, RSS 2.0's top-level namespace would have to be non-empty.

What happens if you simply assign an RSS 2.0 feed to a namespace? As it turns out, many (but not all) existing aggregators won't be affected by that change.1 That sounds like good news, but really it isn't. It's true only because those aggregators aren't strictly observing the rules of XML.

What to do? Here are some choices:

  1. RSS 2.0 producers -- and later, consumers -- could switch to use of a defined top-level namepace. This would be a major discontinuity.

  2. Applications wishing to embed RSS 2.0 payloads could modify them, in effect wrapping the payload in a namespace. This would be awkward, because partner applications would need to unwrap the payload in order to use standard RSS parsers -- at least those that play strictly by the XML rules, though as we've seen many do not.

  3. Aggregators could look for a defined RSS 2.0 namespace, and parse accordingly if it were found, but fall back to the empty namespace otherwise. This could enable existing RSS 2.0 feeds to gradual migrate in the direction of embeddability.

We are inclined to recommend the third approach, but will continue to research the issue and gather feedback.

1 The RSS validator does not currently complain when an RSS 2.0 feed declares itself to be in a non-empty namespace. However, it does complain -- correctly -- when elements within the feed declare themselves as belonging to the empty namespace.