Namespaces

James Clark jjc at jclark.com
Wed Feb 3 13:28:05 GMT 1999


Oren Ben-Kiki wrote:
> 
> James Clark <jjc at jclark.com> wrote:
> >  <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.
> 
> So far, so good. But the question is: is it the same relationship between
> "{http://www.w3.org}a"
> and "good" or "{http://www.w3.org}good" in:
> 
> <good {http://www.w3.org}a="1"/>
> <{http://www.w3.org}good {http://www.w3.org}a="1"/>

I would prefer not to answer this since I don't think the XML Namespaces
Recommendation needs to take a position on this.  All the Namespaces
Recommendation does is provide a mechanism which allows element type
names and attribute names to be qualified with a URI. How other
applications or specifications (such as RDF or XML Schemas) choose to
exploit this mechanism is up to them.

However, if I was forced to answer, I would say that the relationship
was not the same. An element

 <{http://www.w3.org}good a="1"/>

doesn't have a well-defined meaning unless the specification of the
{http://www.w3.org}good element type says what the "a" attribute means
on elements of that type.  However an element

 <{http://www.w3.org}good {http://www.jclark.com}a="1"/>

might have a well-defined meaning even if the specification of the
{http://www.w3.org}good element type doesn't mention
{http://www.jclark.com}a attribute and vice-versa, in just the same way
that

<{http://www.w3.org/}good>
  <{http://www.jclark.com/}a>1</{http://www.jclark.com}a>
</{http://www.w3.org/}good>

might have a well-defined meaning even if the specification of the
{http://www.w3.org}good element type doesn't mention
{http://www.jclark.com}a element type and vice-versa.

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