Re: The 'resource' identified by a namespace name URI should be the namespace

On Thu, 1 Jun 2000, Larry Masinter wrote:
> > This is explained, in of all places, the namespace rec. The purpose of
> > xml namespaces is to define xml names such that they have scope
> > "beyond their containing document" (presumably to the universe, given
> > your three choices).
> > 
> > This is accomplished by giving the namespace a name which is a URI uri
> > reference and you can make sure the name is unique by using an
> > absolute URI of a resource you control. (but using the URI as the
> > namespace name does not mean that the resource _is_ the namespace)
> 
> I think that you get into trouble allowing arbitrary URIs 
> as namespace names and that the world would work better if
> it was stated that the 'resource' identified by the namespace 
> name is 'the definition of the namespace'. 

I like this notion; however, it would only work if the relation
which maps a set of URI to a set of resources is an injective 
(1-1) function.  Otherwise, one may have two URI in the set
which map to the same resource ... which would violate the
"uniqueness" requirement and necessitate something smarter
than a byte-by-byte URI comparison.

As Tim BL has stated, this injective property does 
not hold for many URI schemes, including the commonly
used http scheme. However, not all is lost.  The spec 
could be modified to clearly describe a set of URI 
schemes which do have the injective property.  The 
"data:" scheme is one such example.  We could even define
a java package like scheme; "package:com.clarkevans.my-ns"

One could go even further and include restricted versions
of more common URI scheme.  For example, define the "namespace
acceptable sub-scheme for http:" as:
  
  { uri in http: such that for each namespace
    resource, there exists at most one http:
    uri that identifies that resource }

Note:  Unless I am mistaken, this is actual practice.  
There is one and only one http: URI which corresponds 
to the XSLT namespace.  This also is consistent with 
the character-by-character requirement.  This is not using 
the full "http:" scheme, but rather a restricted subset of 
the scheme which gaurentees the injective property.

> Since we currently have no technical means to define
> a namespace other than to identify it, there is no expectation 
> that a namespace name be a URI that is dereferencable.

Right.  But this would suggest that we should start using
"data:" or a "package:" like scheme for future namespace names
and lean away from the "http:" like scheme which not only
fail to be injective, but further have existing interpretations
for the resources which are identified.  

All in all, the solution should satisfy the 3AM test:

  Imagine you have coded all day; went home late, and
  finally got to sleep around 1AM.  Then, at 3AM your 
  beeper goes off... production is down.  You commute
  to work and start fishing around for the broken code...

Best Wishes,

Clark

Received on Thursday, 1 June 2000 17:36:28 UTC