Re: Mechanism, not policy [was: Attribute uniqueness...]

David Carlisle wrote:
> 
> > Yes, it does. That is: to use http://www.w3.org/ as a namespace name
> > is to claim that it refers to a namespace.
> 
> Not at all. I just did it, and I didn't have to claim anything

Yes, you claimed that it's a namespace.

> and the
> document was a conforming document according to the namespace rec.
> 
> Every string that matches the syntax of a URI reference is a namespace
> name.

(I would say: matches the syntax of absolute URI with optional
fragment identifer)

> But not all (if any) resources identified by such are namespaces.

Er... yes, they are, just like every resource identified ala
	<img src="...that uri...">
is (claimed to be) an image.


> Take any URI you like, and give
> 
> <x xmlns=". ... that uri ...." />
> 
> to a sax2 parser, or xslt system or any other namespace aware system
> of your choice. the document will be accepted and the namespace name
> will be that uri. this is just a fact, you can't argue that because
> the namespace has a property called "name" that somehow it has to
> _be_ the same as some resource that has an identifier with the same
> string.

Er... why not?

> me> That a namespace with name a particular URI _is_ the resource
> me> identified by that URI.
> 
> > That's a tautology, no? By analogy:
> 
> No. You always know whether a a string is being used as a namespace
> name or as a resource identifier, so the fact that these two disjoint
> concepts happen to use the same set of strings is no problem.

Of course it's no problem... it's something to be exploited!


> You may _wish_ the namespace to be the resource identified by the
> namespace name considered as a URI, but in general (and probably
> always) that is not the case.

Yes, I do wish it were so, and I sincerely hope we will remove
the typo from the namespace spec that says otherwise.

> I see no way that the namespace
> mechanism could possibly be altered to make it the case.

The mechanism is pretty much fine as is, except in the way
that implementations treat relative URI references.

Just change
	ns_name = elem.getattr('xmlns')
to
	ns_name = urlparse.urljoin(baseURI, elem.getattr('xmlns'))
in the implementations, and that's it.

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Wednesday, 7 June 2000 17:58:26 UTC