- From: Charles Frankston <cfranks@microsoft.com>
- Date: Fri, 4 Dec 1998 17:04:42 -0800
- To: "'peterl@netscape.com'" <peterl@netscape.com>, xml-names-issues@w3.org
The example is intended to clearly demonstrate that the attribute "a" in the context of the <good> element in the 'http://www.w3.org' namespace is local to <good>. On the other hand, the attribute "n1:a" is a "global" attribute from the 'http://www.w3.org' namespace. You might point out that there is currently no way to declare global attributes using DTDs. However, (1) this doesn't mean that there might not be a way to do so in the future. (2) The spec wants to be very careful to ensure that whatever API is designed to return the attributes of an element makes it very clear to distinguish between "a" and "n1:a" in this example. Specifically, this is to avoid a common assumption that because "a" is an attribute on the element <good>, which is from the 'http://wwww.w3.org' namespace, that the namespace of "a" must be 'http://www.w3.org'. It is not. "a" essentially has no namespace, it is merely a local attribute to the element <good> from the 'http://www.w3.org' namespace. I hope this is clear. There is quite a lot of discussion on this subject in the archives. -----Original Message----- From: peterl@netscape.com [mailto:peterl@netscape.com] Sent: Friday, December 04, 1998 3:00 PM To: xml-names-issues@w3.org Subject: Spec question Section 5.3 "Uniqueness of Attributes" explicitly states that the following is legal: <x xmlns:n1="http://www.w3.org" xmlns="http://www.w3.org" /> <good a="1" b="2" /> <good a="1" n1:a="2" /> </x> however, in the second "good" example both attribute's namespace names are equivalent (the default of: "http://www.w3.org" and the explicit "n1"="http://www.w3.org"). So it seems to me that it really is illegal. Please clarify... Peter
Received on Friday, 4 December 1998 20:04:43 UTC