Element-Level NS Declaration

james anderson James.Anderson at mecomnet.de
Mon Aug 24 15:50:36 BST 1998


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.

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;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list