W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > August 2009

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

From: Toby A Inkster <tai@g5n.co.uk>
Date: Wed, 12 Aug 2009 08:58:20 +0100
Message-Id: <5EEC7E19-390D-4856-B124-27EC7F97DD30@g5n.co.uk>
Cc: RDFa Developers <public-rdf-in-xhtml-tf@w3.org>
To: martin@weborganics.co.uk
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.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
Received on Wednesday, 12 August 2009 07:59:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 12 August 2009 07:59:07 GMT