W3C home > Mailing lists > Public > xml-names-editor@w3.org > April 2003

Re: Response to comment on Namespaces in XML 1.1

From: Richard Tobin <richard@cogsci.ed.ac.uk>
Date: Tue, 22 Apr 2003 18:32:22 +0100 (BST)
Message-Id: <200304221732.SAA25782@rhymer.cogsci.ed.ac.uk>
To: Malachi.de.AElfweald@cogsci.ed.ac.uk (malachi@tremerechantry.com)
Cc: xml-names-editor@w3.org

> Does this solve the confusion on inheriting namespaces?

No change has been made to the rules for inheriting namespaces, except
the ability to undeclare prefixes, which is a separate issue.  There
is no possibility of changing the rules, since it would break millions
of existing documents and is not within the scope of this revision to
the spec.

> The most logical approach, for any developer of any language, is that
> an element or attribute is, by default, in the namespace of the
> parent's scope unless specified otherwise.  From what I understand,
> this is true for elements/nodes, but not for attributes.

No, it is not true for either.

> For example, the intuitive approach would say:
>	<html:html...>
>		<a href="..."/>
>	</html:html>
> that the "a" node is in the 'html' namespace (or the URI pointed to
> by that name), and that the "href" attribute is an attribute of the
> "a" node

No, the "a" element is in no namespace (unless there is a default
namespace declaration you have not shown), and this will not do what
you want.  In fact, the situation for attributes is closer to what you
think is intuitive in that although the href attribute is in no
namespace, its interpretation depends on the element it is attached
to.  So you need not (and must not) prefix the href attribute.

-- Richard
Received on Tuesday, 22 April 2003 13:32:24 GMT

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