namespaces discussion

Mark Tucker mct at
Thu Sep 10 21:45:24 BST 1998

John Cowan <cowan at> wrote:

mct> I must confess that I don't understand the problem, but it doesn't
mct> look hard.  To the naive eye, I would just read in the relevant DTD's,
mct> and perform the same "Fully Prefixing" operation.  Since the DTD's
mct> would all be prefixed consistenly, can't we just toss all the
mct> productions into the pot, and turn the crank?  How do they interact,
mct> if they all have differently named elements and interactions?

jc> Not at all, and that's the point.  You won't be able to place elements
jc> from one DTD inside elements from another, unless the enclosing
jc> element has an ANY content model.  What takes work and thought is
jc> figuring out how the content models of the various elements should be
jc> extended (or not) to incorporate elements from other DTDs.  I don't
jc> see how *any* tools whatever can help you much with this, except in
jc> the mechanical parts.

First a question:

			Can I have a DTD that mentions elements
			defined elsewhere?

If so, then I can easily nest elements from one dtd inside another.

In the example below, the N1:BOOK element will contain N1:NAME elements,
and elements from a different namespace N2:ADDRESS

If DTD1, which is denoted by URI "uri:dtd1" says


	v #pcdata>

and DTD2 says (notice that the prefix K doesn't matter, only the definition
as "uri:locatie")			


	v #pcdata>

then an valid instance document could be


    <J1:NAME V="FRED"/>
    <J2:ADDRESS V="Holland"/>
which would conform to DTD1.

What's wrong with this picture?.....

For my needs, DTD1 is a perfectly fine DTD. It defines
local stuff (NAME,BOOK), and references other DTD's to define the sub pieces.

Mark Tucker			tucker_m at
Regenstrief Institute		phone: (317) 630-2606
1001 W. 10'th St; Indianapolis, IN; 46202-2859;	fax: (317) 630-6962

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list