Re: reparing XML Namespaces without breaking existing content

/ Robert J Burns <rob@robburns.com> was heard to say:
|> What problem does that solve?
|
| It establishes a one-to-one correspondence between namespace and
| vocabulary. The lack of this one-to-one correspondence creates
| needless additional work for authors and provides no benefit that I
| can see whatsoever.

What additional work? How does the fact that an attribute is not in a
namespace cause any additional work? Attributes are already
conveniently scoped to the element on which they appear. Although
there are a few attributes that one might like to consider "global",
that doesn't seem to me to be the common case.

Are you striving to make these two "class" attributes

  <xhtml:div class="fred">

and

  <db:section xhtml:class="fred">

somehow exactly the same? Is that the use case?

|> That's neither backwards nor forwards compatible
|
| My proposal is to make a change that is both backwards and forwards
| compatible. No existing content would break.

It's possible that you're proposal is exactly the right thing to do
(I'm not convinced), but it is flatly not backwards or forwards
compatible. I humbly suggest that describing it that way is going to
cause a lot of unproductive argument and you'd be better of not doing
so.

|> and seems at odds
|> with:
|>
|>  <x:foo bar="1" x:bar="2"/>
|>
|> which is, though perhaps odd, entirely valid.
|
| It is definitely at odds with that,

Hence my observation that it *isn't* compatible.

| because although XML Namespaces
| declares that valid, there's this has long been a precedent that there
| should be no two attributes for the same vocabulary on the same
| element.

In what communities? It's uncommon, rare even, but I don't know of any
precedent against it. In the current state of play, those aren't two
attributes for the same vocabulary.

| There's no other way to interpret that example than to enable
| this invalid markup (though declared valid in XML Namespaces). That
| construct doesn't help authors because if they do that they now have a
| processing error at the worst and a processing inoperability at best.

That depends entirely on the semantics of the attributes and the
element. But I grant that it's confusing.

| Which value for bar should get passed to the processor for the
| namespace corresponding to the prefix 'x'? Is it '1' or '2'? Why would
| XML Namespaces want to enable that?

What do you mean by "passed to the processor for the namespace
corresponding to x"?

Do you have in mind a mental model where an element can ask for "all
of the attributes in the HTML namespace", then "all of the attributes
in my namespace", and if the element is in the HTML namespace, it gets
the same set for each of those calls?

Where does this provide value? In almost all of the processing code
that I've written, the processor knows for a given element what
attributes (by name) are important and can do little more than ignore
any other attributes, irrespective of whether or not they are
namespace qualified.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | There is a road from the eye to the
http://nwalsh.com/            | heart that does not go through the
                              | intellect.--G. K. Chesterton

Received on Thursday, 29 May 2008 16:53:53 UTC