« XML technologies: use these, throw the rest away | Main | XML Namespaces - it continues »

RSS2.0 sans XML Namespaces

The Fishbowl: Namespaces and RSS2.0

Charles Miller picks up on my namespaces post, and gives a good breakdown of the need for namespaces. I 'm going to try to get around that by agreeing with him on policy (namespace), but disgreeing on mechanism (XMl Namespaces)

There are two ways to solve this. One is that you have some central authority with whom to register extensions, who ensures that everyone plays nicely with each other. For RSS, that central authority would have to be Dave Winer. This kind of centralised authority didn't sit well with the RSS community, which wanted the ability to go off in different directions without permission.

This would not be good, even though it's worth recognizing that there aren't many non-centralized mechanisms for naming things - GUID generators are a good example. Most XML Namespaces are based on HTTP URLs which ultimately require domain names. Domain names are centralized to a degree, but this time it's ICANN, not Dave Winer. At least you only have to do this once a year.

The other is with namespaces. Namespaces are defined by URI, so their uniqueness is ensured in the same way as Java package names. *

The third unstated option is to make your element name sufficiently unique. To do this, you can simply use fully qualified domain names to wrap your vocabulary or element.

Taking Charle's lastUpdated example. We could deal with that in a few ways. We could agree that two or more lastUpdated tags do in fact have the same meaning and say their encodings are different. An attribute qualifier would be useful there. That could be an xsd type, a mimetype, a URI, or simply a string. The point is that in this case it's not the element that needs to be uniquely identified, it's the encoding of the element content that needs identification. Another way is to tag the element with a fully qualified domain name.

Here are some options:

  <lastUpdated vocab="net.amadan.rss-ext">

I think it's extremely unlikely that you're going to clash with anyone else here.

So yes, if you have full control over the schema, namespaces are unnecessary. If you have lots of people trying different things without deferring to a central authority, namespaces are necessary to stop them stepping on each others toes.

I disagree with Charles here - XML Namespaces are just one of many options. Though I could have been clearer in the other post. I don't question the need to partition names, but I do question the use of XML Namespaces to achieve that.

[* not strictly true. Some URIs, ie the urns, don't require a domain name]

June 29, 2003 01:58 PM


Trackback Pings

TrackBack URL for this entry:

Listed below are links to weblogs that reference RSS2.0 sans XML Namespaces:

» Avoiding namespaces from The Lurker
TITLE: Avoiding namespaces URL: http://lurking.org/lurker/thing.php?thing=147 IP: BLOG NAME: The Lurker DATE: 06/30/2003 01:35:47 PM TITLE: Avoiding namespaces URL: http://lurking.org/lurker/thing.php?thing=147 IP: BLOG NAME: The Lurker DATE: 06/30/2003 01:35:47 PM [Read More]

Tracked on June 30, 2003 01:35 PM

» more namespaces from Raw Blog
Bill de hra: RSS2.0 sans XML Namespaces How do you validate <blah.blah.net.title> style namespaces? Won't it mean (almost) arbitrary element... [Read More]

Tracked on June 30, 2003 08:59 PM