W3C home > Mailing lists > Public > xml-names-editor@w3.org > November 2006

Re: Namespace of the xmlns Attribute

From: Richard Tobin <richard@inf.ed.ac.uk>
Date: Mon, 27 Nov 2006 15:56:57 +0000 (GMT)
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>, xml-names-editor@w3.org
Message-Id: <20061127155657.11A2116E55E@macpro.inf.ed.ac.uk>

>    Is the xmlns attribute supposed to be put into the 
> http://www.w3.org/2000/xmlns/ namespace, just like other attributes with 
> the xmlns: prefix, or into no namespace like any other attribute without 
> a prefix?

Most namespace-aware applications (e.g. XSLT) do not make namespace
declarations available as attributes, so for these the question does
not arise.

The Namespaces spec does not really address the question.  The
production [15] (Attribute) distinguishes between namespace
declarations and ordinary attributes, and does not use the QName
production for declarations.  Originally it did not define any
namespace for the xmlns prefix used in declarations, but one was added
in an erratum (http://www.w3.org/XML/xml-names-19990114-errata#NE05),
I believe at the request of the DOM WG.

The Infoset spec on the other hand explicitly states that the namespace
URI of all namespace declaration is http://www.w3.org/2000/xmlns/
(see http://www.w3.org/TR/xml-infoset/#infoitem.element), so the 
implementations you mention are conforming to that.

-- Richard
Received on Monday, 27 November 2006 15:56:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:45 GMT