- From: David G. Durand <david@dynamicdiagrams.com>
- Date: Tue, 20 Jun 2000 14:09:39 -0400
- To: XML-uri@w3.org
Andrew Layman <andrewl@microsoft.com> wrote: >David Carlisle wrote "The _essential_ feature of namespace names is that >that they support >rapid and 100% accurate comparison that does not depend on the parser being >used." > >As an editor of the Namespaces Specification, I need to report that I do not >recall that as being "the essential feature" of namespace names. I do not >find any text in the specification to support Mr. Carlisle's assertion, nor >do I recall any discussions proposing that or any similar idea. In short, I >do not find any evidence that rapid, parser-independent, 100%-accurate name >comparison was the preeminent goal of the specification. Well, I don't know if things are phrased in David's terms, but there's a _lot_ of support for his assertions in the namespaces recommendation. Let's start with the goal of providing consistent comparison. Here's a quote from the introduction to the Namespaces rec. Quote 1: > Software modules need to be able to recognize the tags and >attributes which they are designed to process, even in the face of >"collisions" occurring when markup intended for some other software >package uses the same element type or attribute name. > >These considerations require that document constructs should have >universal names, whose scope extends beyond their containing >document. This specification describes a mechanism, XML namespaces, >which accomplishes this. Now, it doesn't mention the word "comparison", but certainly a "universal" name is not useful if it can't be used to identify the items named (the elements and attributes). I checked the constraints imposed by the namespaces rec. and aside from requiring prefixes to be declared, and defining the scoping rules, there is one such requirement, which is related to comparison: Quote 2: > >In XML documents conforming to this specification, no tag may >contain two attributes which: > >1. have identical names, or >2. have qualified names with the same local part and with >prefixes which have been bound to namespace names that are identical. > In the context of providing "universal names" and in the context of a syntax definition intended to be enforced by a parser, the specification of comparison based on identity is rather revealing. Of course identity might mean that the namespace names identify the same resource. But it doesn't. The specification also includes a definition of identity: Quote 3: > >[Definition:] URI references which identify namespaces are >considered identical when they are exactly the same >character-for-character. Note that URI references which are not >identical in this sense may in fact be functionally equivalent. >Examples include URI references which differ only in case, or which >are in external entities which have different effective base URIs. The prose about "functional equivalence" is interesting because it makes clear that there are other notions of identity (for instance scheme-specific ones) that are _not_ relevant to this specification. Again, it's rather clear that the simplest deterministic way of assigning persistent and unique names is being used. Those attributes are clearly pointed out, again in the context of decoupling namespace processing from URI retrieval, in the definition of what a namespace name is. Quote 4: >[Definition] The attribute's value, a URI reference, is the >namespace name identifying the namespace. The namespace name, to >serve its intended purpose, should have the characteristics of >uniqueness and persistence. It is not a goal that it be directly >usable for retrieval of a schema (if any exists). An example of a >syntax that is designed with these goals in mind is that for Uniform >Resource Names [RFC2141]. However, it should be noted that ordinary >URLs can be managed in such a way as to achieve these same goals. Again, the intention that things be "universal" and not "context-dependent" seems rather clear. One last quotation from the "Motivation and Summary" reinforces this interpretation: Quote 5: > >Names from XML namespaces may appear as qualified names, which >contain a single colon, separating the name into a namespace prefix >and a local part. The prefix, which is mapped to a URI reference, >selects a namespace. The combination of the universally managed URI >namespace and the document's own namespace produces identifiers that >are universally unique. So, in summary, I don't think that there's any support for your claim: >What the specification does describe as a goal is a means to enable >augmenting element and attribute names so that they can be recognized in a >context wider than their enclosing document type. Not because the "universal context" is not wider than a document type, but because you are now proposing a much more limited notion of uniqueness "relative to a context". Nothing in the rec. as written even implies that context-dependence is a goal, and several aspects of the standard go out of the way to remove context-dependence where it might occur. I can believe that a syntactic oversight allowed relative URI references to slip into the standard, but not that the standard systematically misrepresents its goals throughout the text. You also refer to "discussions." The w3c internal discussions are private, but I know that I at least have consistently represented the same opinions about namespaces and uniqueness and identity. The notion that the comparison _should_ depend on the parser being used is an unusual one in the context of defining syntactic processing in a standards organization. That is the kind of variability which is usually made painfully explicit. Similarly, the need for accurate comparison seems unexceptional in a standard, especially given the pains taken in the standard to define an unambiguous comparison mechanism. Furthermore, that description explicitly acknowledges that other notions of identity exist for URIs (the undefined term "functionally equivalent" seems to stand for all such alternative notions of identity). >Perhaps one can prove that this goal necessitates that "The _essential_ >feature of namespace names is that that they support rapid and 100% accurate >comparison that does not depend on the parser being used." If so, the proof >should be rigorously demonstrated. At present, I find it rather a leap. Actually, I find it rather obvious from a plain reading of the text of the recommendation, and I hope that I have proved that "rather rigorously" by quoting from it. I do find the notion that the design goals included an implicit notion of uniqueness "relative to a context" quite a reach, but I think the same quotations support that argument as well. -- David -- _________________________________________ David Durand dgd@cs.bu.edu \ david@dynamicDiagrams.com http://cs-people.bu.edu//dgd/ \ Chief Technical Officer Graduate Student no more! \ Dynamic Diagrams --------------------------------------------\ http://www.dynamicDiagrams.com/ \__________________________
Received on Tuesday, 20 June 2000 14:17:06 UTC