Namespace training wheels

In general, we don't have much experience creating and using simple XML vocabularies, never mind mixed ones. InfoPath, the first application making a serious bid to enable mainstream folks to routinely gather and use XML data, hasn't even shipped. I think the creators of InfoPath and similar tools -- who hope that use of modular XML vocabularies will turn out to be like riding a bicycle -- ought to provide some training wheels. [Full story at InfoWorld.com]

In a brief item called Namespace Pedantry, Tim Bray points out that it's wrong to say, as I did in this column, that "by default, every element in an XML document is assigned to the 'empty' namespace." The correct statement would be something like 'by default, elements and attributes are not in any namespace.' Fair enough. I don't object to pedantry, and I assume that careful distinctions exist for good reasons. I'm curious to know the reason in this case. I can imagine, for example, that if I wrongly refer to the e6 and a1 in Tim's example as "in the empty namespace" rather than correctly refer to them as "not in any namespace," the flawed conceptual model could lead to errors in my ability to deal with these things. Is that so? And if so, what patterns of error are typical? Comments

I guess this all further illustrates the point of my column, which is that learning to ride the XML namespace bicycle requires a bit of help. An example of the kind of thing I have in mind is this tutorial by Mark Priest, which enumerates the namespace assignments in a sample document under various conditions. It strikes me that an online service that reports such assignments for any uploaded document would be extremely helpful.

Update: It's not just me. Clemens Vasters (whose new design looks like this in Firebird, BTW) also tripped over the "empty" vs. "not-in-a" namespace distinction. In any case, although Clemens suggets that RSS 2.0's lack of a top-level namespace is the issue, the controversy is broader. I mention in my column that Sean McGrath has raised general questions about namespace use. His column on the subject, and related references embedded within it (1, 2), elaborate. My conclusion, nevertheless, is not "don't use namespaces" but rather "use training wheels when learning to ride the namespace bicycle."


Former URL: http://weblog.infoworld.com/udell/2003/08/09.html#a774