Names in Namespaces are a Triple

This comment does not effect the operation of namespaces from the current PR, but it does propose a more elegant analysis and easier-to-understand exposition. The length of the current proposal (more than 10 pages) is at odds with the needs for straightforwardness. In particular, Appendix A2 and A3 would benefit.

The analysis problem flows from treating the element type name as being different from other element values, rather than being an anonymous attribute value.

In the view of many, which I agree with, there is no necessary theoretical justification for treating an element type name as being different from attribute values. The important property of keying DTD content models for DTD validation, but that is a matter of the particular operation of DTD validators, not intrinsic to the element type names themselves. Indeed, "architectural parsers" use some other attribute for this purpose; witness further the HTML SDAform attributes.

The unfortunate effect of analyzing the element type name differently from attribute values is that the namespace PR becomes complicated, and its meaning unclear. I propose the following analysis and exposition, which would replace Appendix A.2 and A.3. There is no need to include any notion of "partitioning".


A.2 Expanded Names

Expanded names, for the purposes of this specification, are a triple:

	[ namespace name, element name,  attribute name]

where

With the meaning:

A.2.1 Example

Thus the example:

<?xml version="1.0"?>
<!-- initially, the default namespace is "books" -->
<book 
	xmlns='urn:loc.gov:books'
	xmlns:isbn='urn:ISBN:0-395-36341-6'>
	<title>Cheaper by the Dozen</title>
	<isbn:number>1568491379</isbn:number>
	<notes type="commentary">
		<!-- make HTML the default namespace for some commentary -->
		<p 
			xmlns='urn:w3-org-ns:HTML'>
			This is a <i>funny</i> book!
		</p>
		<!-- use the default local namespace too -->
 		<local value="override with "/>
	</notes>
</book>

It contains the following expanded names:

NAMESPACES:

	['urn:ISBN:0-395-36341-6', , ]
	['urn:w3-org-ns:HTML', , ]
	['urn:loc.gov:books', , ]

ELEMENTS:

	['urn:loc.gov:books', book, ]
	['urn:loc.gov:books', title, ]
	['urn:loc.gov:books', notes, ]
	['urn:ISBN:0-395-36341-6', number,]
	['urn:w3-org-ns:HTML',p, ]
	['urn:w3-org-ns:HTML',i, ]
	[ ,local, ]

ATTRIBUTES:

	['urn:loc.gov:books', notes, type]
	[ ,local, type]

A.2.2 Schema for Expanded Names

A schema for the expanded name is given below, using markup declaration syntax.

	<!ELEMENT ename ANY >
	<!ATTLIST ename
		xmlns	   CDATA #FIXED "editor: put URI of this document here"
		namespace  CDATA #IMPLIED
		element	   NAME  #IMPLIED
		attribute  NAME #IMPLIED >

I believe this version of A.2 and A.3 expresses the intent of the PR with greater rigour, clarity, power and usefulness than the current text.

Note that this proposal would allow the definition of Namespace to become simpler: [Definition:] An XML namespace is a set of composite names, identified by a URI reference [RFC2369], which are used in XML documents as element types and attribute names. The composition of these names is detailed in "A. The Internal Structure of XML Namespaces".

Furthermore I think it might aid the wordsmithing of the final main text, and also prepare better for future namespace development. For example, extending namespaces to include enumerations in attribute values can be trivially accomplished by making the expanded name a quadruple [ namespace name, element name, attribute name, enumeration name]. I might also say, that it contains no explanatory text which may support particular hidden agendas, and so might prove less contraversial and tedious for the editors and explainers of namespaces than the current PR.

Rick Jelliffe, Computing Center, Academia Sinica, Taipei