Namespace question: Do attributes inherit the element's namespace?

David Megginson david at
Thu Jan 6 19:12:13 GMT 2000

Leigh Dodds <ldodds at> writes:

> Attributes don't have namespaces. And therefore your tools are correct.
> Attributes live in the per-element-type partition.
> See, and
> for some examples of
> how Namespaces are applied to attributes.
> The acceptions are 'global' attributes which live in a separate
> partition, the global attribute partition, and these can have a
> Namespace.
> I don't claim to fully understand this though


You're not alone -- this point has caused as much confusion as any
other in the Namespaces spec.

Remember that Namespaces have to do simply with identification (this
is an A) and distinction (this is not a B); they don't say anything
about what A and B mean.

Basically, then, the main question was whether the attribute names in
the following two examples are identical:

  <html:a href="foo">


  <html:a html:href="foo">

For most applications (such as RDF, and, possibly, XSL), the answer is
a firm 'no', but the WG decided to make it *possible* to distinguish
the two in case anyone ever thinks of a good reason to do so.

All the best,


David Megginson                 david at

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list