[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
namespace qualifications
I noticed Tim Bray calling me confused on his blog so I thought I
better respond.
<feed version="0.2" xmlns="http://purl.org/atom/ns#">
For some wacky reason, under XML namespace rules the version
attribute is actually in the unqualified namespace,
I must admit "in the unqualified namespace" was a poor choice of words,
but I hope it was obvious that I meant "not in a namespace" or "not
qualified with a namespace" or however the hip kids say it. I tend to
think of elements not in a namespace of having a name like (None,
"name") which is probably why I said this, although this isn't the way
SAX implements things.
not the default namespace. It either needs a prefix or be moved to
an element to be valid.
It's not a problem for attributes to be unqualified, as long as they
are only used on qualified elements, which the atom elements are.
This seems like a really bizarre thing to say. Would it be equally OK
to say "It's not a problem for elements to be unqualified, as long as
they are only used inside qualified elements"? How can you say for sure
no one else is ever going to want to use that element, or that
attribute?
This isn't just a theoretical concern. Assuming we stick with the
superstitious version attribute, I can see wanting to come up with my
own container for atom entries that was better or different in some
way, and creating a new element in a new namespace for it, say
aaronsw:bowl. But I might want to retain atom's versioning scheme so
that an aggregator that supported feeds and bowls would follow the same
versioning rules for each. That's currently impossible.
--
Aaron Swartz: http://www.aaronsw.com/