Fw: Namespaces
James Clark
jjc at jclark.com
Wed Feb 3 10:52:42 GMT 1999
Oren Ben-Kiki wrote:
> <x xmlns:n1="http://www.w3.org"
> xmlns="http://www.w3.org" >
> <good a="1" b="2" />
> <good a="1" n1:a="2" />
> </x>
>
> would have the equivalent (extended) Clark encoding
> (http://www.jclark.com/xml/xmlns.htm)
>
> <{http://www.w3.org}x xmlns:n1="http://www.w3.org"
> xmlns="http://www.w3.org" >
> <{http://www.w3.org}good {{http://wwww.w3.org}good}a="1"
> {{http://wwww.w3.org}good}b="2" />
> <{http://www.w3.org}good {{http://wwww.w3.org}good}a="1"
> {http://www.w3.org}a="2" >
> </{http://www.w3.org}x>
It would have the (non-extended) Clark encoding of:
<{http://www.w3.org}x>
<{http://www.w3.org}good a="1" b="2" />
<{http://www.w3.org}good a="1" {http://www.w3.org}a="2" />
</{http://www.w3.org}x>
Putting {{http://wwww.w3.org}good} in front of the unprefixed attribute
names needlessly confuses things. When I write in XML
<good a="1"/>
what is the relationship between the attribute name "a" and the element
type name "good"? It's hard to describe but they're clearly not
unrelated: roughly speaking knowing what the attribute name "a" means
depends on knowing what the element type name "good" means. But we
don't need to fight this one out: whatever this relationship is, when I
write
<{http://www.w3.org}good a="1"/>
this relationship is exactly the same relationship as holds between the
attribute name "a" and the element type name "{http://www.w3.org}good".
XML namespaces aren't changing anything here. That's why
<{http://www.w3.org}good a="1"/>
not
<{http://www.w3.org}good {{http://www.w3.org}good}a="1"/>
is the right way to describe what's going on.
James
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list