W3C home > Mailing lists > Public > xml-names-issues@w3.org > October to December 1998

RE: Spec question

From: Charles Frankston <cfranks@microsoft.com>
Date: Fri, 4 Dec 1998 17:04:42 -0800
Message-ID: <B9D1827FDF66D111925800805F3102E309660D51@RED-MSG-57>
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 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.30 : Tuesday, 12 April 2005 12:17:17 GMT