Re: The "real" reason why xmlns should "not" be used

Hello Toby .

Toby A Inkster wrote:
> On 12 Aug 2009, at 05:24, Martin McEvoy wrote:
>
>> <div xmlns:dc="http://purl.org/dc/elements/1.1/">
>>   <h2 property="dc:title">The trouble with Bob</h2>
>>   <h3 property="dc:creator">Alice</h3>
>>   ...
>> </div>
>>
>> The above example is invalid because it declares the div having a 
>> prefix of dc: example:
>>
>> <dc:div xmlns:dc="http://purl.org/dc/elements/1.1/">
>>   <h2 property="dc:title">The trouble with Bob</h2>
>>   <h3 property="dc:creator">Alice</h3>
>>   ...
>> </dc:div>
>
>
> No Martin, that's not how the default namespace (which <div> is in) 
> works. xmlns="..." sets the default namespace, so would have an effect 
> on the meaning of <div>. xmlns:dc="..." sets an explicitly prefixed 
> namespace, so has no effect on the meaning of the <div> element.

I am misunderstanding the meaning of this 
http://www.validome.org/xml/validate/?lang=en&viewSourceCode=1&url=http://weborganics.co.uk
/test/xhtml-test.xhtml ?

Best wishes

-- 
Martin McEvoy
http://weborganics.co.uk/

Received on Wednesday, 12 August 2009 11:41:25 UTC