Re: null namespace Re: Next steps for the ARIA syntax discussion

HI Steven,


On May 28, 2008, at 1:38 PM, Steven Pemberton wrote:

>
> On Wed, 28 May 2008 14:59:27 +0200, Robert J Burns  
> <rob@robburns.com> wrote:
>
>>> On the other hand, a prefixed attribute is a *completely  
>>> different* attribute from an unprefixed one. This is why the  
>>> following (frequently not-understood) example from the namespaces  
>>> spec is OK:
>>>
>>> 	<x xmlns:n1="http://www.w3.org"
>>> 	   xmlns="http://www.w3.org" >
>>> 	  <good a="1"     b="2" />
>>> 	  <good a="1"     n1:a="2" />
>>> 	</x>
>>>
>>> a and n1:a are two *different* attributes, and it is up to the n1  
>>> spec to say what n1:a means. They must be different, because the  
>>> XML spec doesn't allow duplication of attributes on an element.
>>
>> This example should also be exorcised from the spec. The namespaces  
>> spec facilitates the placement of two of the same attributes from  
>> the same vocabulary on the same element and that cannot be good.
>
> You misunderstand. They are saying that the two attributes can be  
> uniquely identified, so all is well. Whether a markup language  
> should allow it or not is up to that language. Remember that a and  
> n1:a are two different attributes, one in the Global Attribute  
> partition and one in the Per-element-type partition, using the  
> language of the appendix I was talking about.

No, I understand what you're saying. However, what I'm saying is that  
XML namespaces should not facilitate something that we agree should  
not be possible: that is to attach two attributes from the same  
vocabulary to an element when there is no way for a processor to  
properly handle that situation (except to choose to ignore one or the  
other attribute in an non-interoperable fashion). For this example,  
which value for the a attribute in the http://www.w3.org namespace  
does the processor pass the handler for the corresponding namespace:  
'1' or '2'? One processor may use one value and the other processor  
may use the other value (or technically this could lead an author to  
add any arbitrary number of attributes to the same element — a='1',  
n1:a='2', n2:a='3', etc. — all from mapped to the same vocabulary).

Treating unprefixed attributes as namespace scoped to their parent  
element is a far superior approach that creates a much more consistent  
namespacing mechanism.

Take care,
Rob

Received on Wednesday, 28 May 2008 14:28:27 UTC