Signin
Really Simple RSS Extensions

I hate XML Namespaces.  Its ugly and difficult to grep (pun intended).  Its also makes hand coding XML difficult since one has to remember those namespace URIs.  There can be no defense for XML Namespaces, for the controversies over it can not be denied.  While RSS 2.0 introduces XML Namespaces into RSS, I intend to present a simpler approach that does not use XML Namespaces.

In RSS, there are two areas where extensions are most likely, inside <channel> and inside <item>.  To support extensions in these two areas, we introduce three rules:

  1. RSS parsers must ignore unknown tags.
  2. Unknown RSS tags are opaque - this means you cannot enumerate its children.
  3. Encapsulate custom tags inside a tag whose name starts with domain name.

Here is an example:

<channel>

  ...

  <com.docuverse.daily.tags>

    <title>semantics of extension tags are context sensitive.</title>

  </com.docuverse.daily.tags>

  <item>

    ...

    <org.slashdot>...</org.slashdot>

  </item>

  ...

</channel>

This approach to extensions can easily be manipulated using simple regular expression based tools.  Its easy to read and write.  Its namespaces done right.  Its a solution that is willing to sacrifice that problematic 20% in return for simplicity.

   

Comments
All you have done is replace one namespace notation with another: the domain-name tag is insufficient as one domain may be webhost to dozens of extension libs, so the tag has to be a full URI resolving to the spec that describes the new tags, and thus you've only moved that URI spec from the top of the file to be the wrapper around tags; if, such as with Dublin Core, those tags appear in many places in the file, you have many places that require your domain-name wrapper tag. Namespaces is more elegant.

I think its probably long complex URIs that is your issue rather than the namespace syntax per se.

I was going to say essentially the same as James, although I'd have suggested a http-prefixed (not necessarily addressable) such as http://purl.org/docuverse#daily.tags

nope, I can't agree with the people taking exception with Don's solution here. This solution offers some very real benefits which is why it is in fact a design pattern for several large xml-based languages. For example xmi, http://xml.coverpages.org/xmi.html would be a good place to look at a design which deals with the problem of widely variant possible markup not via namespacing but the name.name.name pattern(I don't know what to call this kind of solution, I just notice it every now and then).

One benefit of doing namespace the current way is to abstract the "prefix" of the namespace and the actual namespace name. It makes hand coding "EASIER", not more difficult. It also solves the problem of name conflicts. It may not be easy to grep, but hey, XML is designed to be used with a XML parser, not regex!
bryan, point taken but I'm not so sure XMI is a great example of XML markup :). I mean anyone ever type that verbose stuff by hand?
I see no point in pursing further discussions over this proposal since it will just be a repeat of what comes on XML-DEV seemingly every other months. At this point, I believe the proof is in the practice. I intend to put this method of extension in practice and let others learn from experience. You are welcome to search through XML-DEV and SML-DEV archives for discussions over XML Namespaces and alternate proposals.

Comment has been disabled for this post.