Namespace Comments (and dtd encoding) (+ some rambling)
David G. Durand
dgd at cs.bu.edu
Thu Aug 6 20:29:14 BST 1998
At 2:54 AM -0000 8/6/98, MURATA Makoto wrote:
>David G. Durand wrote:
>>defense of local scoping.
>As a member of the WG, I have been involved. I have agreed on colonization,
>and have always believed that colonization provides a good basis for
>the namespace extension. Now that we have local scoping and declaration by
>attributes, I start to wonder. (Skip the rest of this message if you
>do not want to hear.)
Well, I think that a bit of this discussion in public can serve an
educative function. I don't think that it is likely to get changes made,
but I'm not unhappy with that.
I like the current proposal, _as a way to use colonized names_, even though
I think we would have done better to stick with architectural forms. So I'm
an advocate of this form of the namespace proposal over the alternatives,
even though I'm not a namespace advocate per se.
>Historically, we have always assumed that it should be possible to
>validate an XML document with namespaces with validating parsers of XML 1.0.
>This is not the case, any more. Since the same prefix can be bound to
>different namespaces, it is no longer possible to construct an equivalent
>XML 1.0 DTD from a collection of namespace-schema pairs.
It's still possible to use namespaces with DTDs and get the benefits of
validation and structural control that DTDs offer, while applying a fixed
number of namespace constructs. And enabling the use of DTDs is all that
any colonized name proposal can offer, since the prefix is changeable
without changing the intended document semantics (but breaking the DTD, and
validation). If you strictly avoid the use of local scoping, you can get
exactly the same effect as the earlier proposals. If you only apply local
scoping in restricted ways you can get the same validation effects, but are
more robust in the face of some validation-hostile operations. For
instance, if more locally scoped subtrees are added to the document, no
element naming need occur.
In any case, many uses of namespaces have always been known to be
unvalidatable -- you can't both fix a structure via a DTD, _and_ add stuff
to that structure on the fly. Since people do intend to do that, I think we
should create a way that it can be done safely. That means that local
namespace declarations should be possible. Local prefix binding can be used
to radically lower the chance that a prefix conflict will lead to elements
being interpreted as part of the wrong namespace, and can also reduce the
number of times that document-processing software will have to re-map
prefixes to avoid a conflict (a confusing as well as DTD-trashing
operation). Many namespace uses, eg. for meta-data, have to do with the
addition of small clumps of tags froma common namespace. If the dublin-core
meta-tags at the head of a document can declare their own prefix local to
the tags themselves, the chances ar emuch lower of conflict with other
prefixes and tags (perhaps LC, or Dewey Decimal, or something else).
> Then, what is
>the point of using prefixes? In my understanding, one reason that we
>chose colonization rather than reserved attributes is validation by XML 1.0
>parsers. This reason no longer exists. (Note: The other reason was
>qualification of attributes.)
I think qualification of attributes is the only reason that holds water,
since validation is no more badly trashed by the current namespace proposal
than the other one. In each case, validation is only possible if namespaces
are used in a limited and relatively rigid way.
>>Declaration of namespaces are inherited. But we also want to have
>inheritance of prefixes in the future. That is, we would like an
>element to inherit prefixes from superior elements. Thus, we will
>have complicated interaction of two types of inheritance. For example,
>it will become possible for an element to inherit a prefix and not to
>inherit a namespace dcl. One could argue that these two should always
>be in sync, but then what is the point of having the two? It would have
>been a lot simpler if we had introduced a reserved attribute for specifying
>the namespace of the element.
This is the very limited (monovalent?) architectural form approach I
proposed many times. It might have flown except for qualified attribute
names (a concept I still find pretty opaque), and because people had their
hearts set on the colonized name syntax.
Colonized names were the strong favorite of all namespace supporters --
given the decision to use prefixes, local scoping seems to me the best way
to manage those prefixes.
I share your unease with respect to validation, and I still have weak hopes
the some schema mechanism will actually work properly. I personally suspect
that we will have many competing schema languages defined for WF XML
documents. This puts us at least in a portability league with LISP
S-expressions, which is actually pretty good.
Perhaps no single schema mechanism _can_ be useful for all the applications
of XML, and the chaos I fear will instead be a common language (of XML
instances) that fall into dialects determined by fixed schemas, or a number
of economical specialized schema languages.
David Durand dgd at cs.bu.edu \ david at dynamicDiagrams.com
Boston University Computer Science \ Sr. Analyst
http://www.cs.bu.edu/students/grads/dgd/ \ Dynamic Diagrams
MAPA: mapping for the WWW \__________________________
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev