DTDs and namespaces (was Re: Namespaces on Attribute Names

james anderson James.Anderson at mecomnet.de
Tue Jul 21 20:51:35 BST 1998


David Megginson wrote:
> 
> james anderson writes:
> ...
>  > do i understand the suggestion correctly, to specify that the
>  > presence of an attribute from a given namespace denotes a dynamic
>  > subtype relation between the containing element and an element with
>  > the same name as the prefix used for the namespace (the correctness
>  > of applying 'LC.getRefNo' to the element).
> 
> No, I wouldn't go that far, mainly because namespaces don't have
> elements or attributes; they just have names.
> 

ah!! music to my ears....

> I'd suggest instead that the attribute from a given namespace implies
> a subtype relationship between the current element and an unnamed
> element type that includes the qualified attribute.
> 

but then, i'm not sure this is any better.
if it's "unnamed" then all that has been accomplished is that, by virtue of
changing the prefix between the tag name and the attribute name, you're
permitting attributes in addition to those declared in an attlist. why
encumber namespaces with this?

>  [skipping merrily over the rhetoric]
> 
> Namespaces and DTDs are two different kinds of things: a DTD specifies
> what an author is allowed to include in a specific document, and what
> defaulting for attribute values, etc., should be used.  A namespace
> simply guarantees that a name is globally unique, whatever that name
> happens to be used for.

with which i agree, and which is why i am skeptical of saying that the
presence of particular prefixes implies the pertinence of "unnamed" element types.
> 
>  ...
> 
> The problem with DTDs will come if namespaces include some kind of
> defaulting or local scoping mechanism -- at that point, writing a DTD
> for an XML document will become extremely difficult.

here we get to something substantive.

with the proper storage model for universal names and the proper encoding
semantics, i have yet to see a case where there is a problem.

if the universal names are taken to denote symbols , then the prefixes (or the
lack thereof in the case of implicit qualification through lexical or dynamic
prefix scope) do (does) not matter. (please see my earlier posts in this
thread as well as my responses to MURATA Makoto under the thread "attributes
with intent (and namespaces)" ca. 03.07.)

no, i do not claim it could be implemented to the benefit of the DPH.
yes, it could be done with SAX.

bye,

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