- From: David Carlisle <david@dcarlisle.demon.co.uk>
- Date: Mon, 5 Jun 2000 00:43:55 +0100 (BST)
- To: xml-uri@w3.org
> We are discussing how to fix them. They are currently inconsistent > with XPath. No. Namespaces are not broken, and don't need fixing. Some people want to build a completely different infrastructure based on completely different principles, which is fair enough. However they for some unexplained reason want to call this new concept `xml namespaces' and obsolete or deprectate the existing xml namespace concept. It is fortunate for these people that xpath is inconsistent with namespaces, which gives half an excuse for revoking the current spec. But even if the decision is taken to bring namespaces into line with xpath rather than the the other way round, the change should restrict itself to just changing those documents for which xpath and namespaces disagree (which is those using a relative uri as namespace name). This is _not_ an excuse for redesigning xml namespaces from first principles. So the following facts about namespaces should remain true after any re-issue of the namespace spec. * Namespaces are not "defined" they are just used (declared) in document instances. * The namespace name is a URI reference (or URI or URI + fragment id if one of the possible, but unfortunate, changes is made). The existence or not of a resource at the URI used as the namespace name is immaterial to all namespace processing. (Although some process following the xml namespace parse may of course dereference the name as a URI if it cares to do so) * XML schema (and dtd and other such syntactic definition languages) are not for "describing the syntactic properties of a namespace" they are for describing the grammar and datatypes of a language that may use elements from one or more namespaces (or from no namespace). For example there are several schema using elements from the XHTML namespace, but <foobar xmlns="http://www.w3.org/1999/Markup/XHTML"/> is a well formed XML document that conforms to the namespace spec. The namespace of the element is the namespace used for XHTML. Of course the document doesn't validate against any of the current schema but it may validate against a future one and whether or not it does is irrelevant to a namespace aware parser (as used for SAX2, or xslt or xpath, etc). Schema validation sits above namespace parsing, it is not an integral part of it. All namespaces have identical structure (which is why they don't need to be defined anywhere) they have one property (a name, which happens to have URI syntax, although that isn't used by a namespace parser) and the consist of the countably infinite set of (expanded) names which consist of the pair, with namespace name being the name in question, and local name being any NCName. So foobar above _is_ in the namespace loosely refered to as the "xhtml" namespace, and will be reported as such by sax2, by XSLT etc. Every namespace has exactly the same set of local names. The existence of a schema (or in the case of xhtml, several schema) using elements from the namespace does not alter the namespace at all. * Users can choose a unique namespace name for namespaces they want to use without requiring a central registry, or owning an internet domain name. * Exiting namespace names which are absolute URI possibly with fragment id remain valid. (and don't require any particular format of file to be placed at the URI) * Namespace parsing never requires the retrieval of any external resource. It is not that no other concept has valid uses, but if (at least) the above are not preserved then there is no point on calling whatever is planned "xml namespaces" and no point in the new system taking over the existing xmlns= and xmlns:foo= namespace syntax. If it is different, call it something different. David
Received on Sunday, 4 June 2000 19:39:28 UTC