RE: Element-Level NS Declaration

james anderson (James.Anderson@mecomnet.de)
Mon, 24 Aug 1998 15:58:36 +0200


Charles Reitzel wrote:
>
> Before addressing each case, I think I have found an underlying difference
> in how folks view the namespace prefix. One camp sees the prefix being
> defined *by* the DTD and therefore as a global identifier itself. The other
> camp wants to define the prefix *for* a DTD and, thus, only within a
> document.

There is also a third "camp" (more an outpost), which expressed the need to do both.

> Specifically, if the namespace is set as a #FIXED attribute for
> an element in the DTD, then prefix collision is likely (unless the entire
> global ID is used as a prefix).

The #FIXED attribute binding does not lead to a problem which element or
attribute names, since the element constitutes a scoping boundary. It may lead
to confusion with "captured" entities, but that issues is not directly related
to the attribute-based prefix binding mechanism.

> This is an inherent shortcoming of the
> prefix notation and inhibits DTD reuse.
> IMHO, a more useful approach for most developers is as I posted (based on
> others' previous posts): prior to "including" each DTD, set the default
> namespace.

A dtd may well include names which designate more than one namespace. A means
to specify a default binding with a scope which includes the DTD is not
sufficient.

> The objective is to associate a DTD with that namespace without
> changing the DTD. Perhaps a new syntax is needed to make this association
> explicit. An analogy might be using VMS logical names or Unix environment
> variables (e.g. $DATAHOME=//Host/Dir/Sub") to point to a resource that can
> move or change.
>

The previous (PI-based) proposal already permitted this. No new "syntax" is needed.