Re: [Widgets] Widget Gallery RSS like sharing format

On Mar 18, 2009, at 09:35 , Andrew Welch wrote:
> Are you sure changing the namespace is preferable to a version
> attribute?  Seems very drastic, and usually it's best to avoid doing
> it as it makes all tools that process existing markup redundant.

I didn't say that changing the namespace should be the versioning  
mechanism, I said "If at some point we make breaking changes, then we  
just change the namespace." That's very different!

The idea is that in version 1.1, 1.2, perhaps even 2.0, 3.0 we just  
add elements and attributes, and when they are not understood they are  
simply skipped. We only ever get to change the namespace if and only  
if at some point, in a future version, we realise that we have got  
everything wrong (perhaps because the usage of widgets has changed  
radically) and need to start from scratch. I don't see that happening  
within a reasonable time frame, and if it does we'll have a bunch of  
other problems to solve anyway.

> Also, you mention most users "just copy-paste the root element" -
> surely you'd still have the problem if you change the namespace?

Yes, but presumably if we were brought to be in a situation where we  
would need to change the namespace, we would be making a whole lot of  
other changes that would make copy-pasting impossible anyway. In other  
words, we'd be defining a new language.

You describe further applications of a version attribute, notably the  
ability to give a "proper error" (you have a v1 processor, this is a  
v2 document) and the ability for an implementation to switch code paths.

For one, errors that the end-user can't do much about should be  
proscribed as much as possible. If your phone tells you you need a v2  
user agent, there's not much that the average user can do.

You also don't address the case of a user stating that a document is  
v1 but using v2 features. That's going to happen a lot, not just  
because of copy-pasting but simply because people don't know which  
version added what feature. Do you know which version of HTML added  
sup, blockquote, listing, tab, font, math, em, or the script attribute  
on form?

> At the moment, I don't think there is any establised "right way" when
> versioning xml, but changing the namespace is a bad idea.

There's no fully established right way, but there's a body of work and  
experience to guide us. See:

for some stuff, or more precisely (if you have the time):

Seeing as these are fairly long write-ups, you might wish to focus on  
part 1 (which concerns us) and more specifically on section 7. The  
approach I'm proposing (and which is also that of the draft) is based  
on experience with languages that are to be used by web developers and  
deployed to a large and varied set of distributed clients over which  
there is very little control (i.e. HTML and SVG, mostly). It can be  
summed up as:

  - ignore what you don't know
  - in a new version, add new features in such a way that ignoring  
them doesn't break anything
  - if and only if you need to make a new version that can't be made  
compatible, then change the namespace

Robin Berjon -
     Feel like hiring me? Go to

Received on Wednesday, 18 March 2009 12:03:42 UTC