Summary of Namespaces and Validation

Liam R. E. Quin liamquin at
Fri Sep 11 09:22:00 BST 1998

On Thu, 10 Sep 1998, Tim Bray wrote:

> 1. Build a compound DTD that has prefixed declarations for all your
>    elements and attributes.  This is the hard part.
Yes, I agree.
MurataSahn's Forest Automata work may help a little -- see Paul's paper
for some examples.  Bt it does not solve the problem itself.

> What really bothers me is that discussion here keeps obsessing over the
> tedious but straightforward problem of matching up prefixes, and nobody's
> thinking about the interesting and difficult problem of compounding DTDs.
I think it's because that part doesn't sound hard.

The main difficulty I see is that we don't have a way of associating DTDs
(or fragments) with prefixes,  I'll start by assuming that such a way
exists and then see if that helps...

File 1, using prefix A:

File 2, using prefix B:
<!--* supper is my bestest meal! *-->

Now <Sup> in an instance may have either mixed or element content,
depending on the context in which it occurs.

But we can transform it into A:Sup (mixed) or B:Sup (element) in
every case.

In fact, every element mentioned in a DTD can be algorithmically
normalized by prepending the prefix associated with it.

And if a DTD refers to another fragment with a prefix, the
same rules can be used.

If a DTD refers to multiple external definition sets, with multiple
prefixes, it is necessary to determine the source of each referenced
element type, which may require a two-pass algorithm to collect all
of the element definitions and then associate them with the right
prefixes.  The fact that an element type can be referred to before
it is declared makes this slightly more complex, but is necessary...

Tim, what am I missing?  Apart from the face that we lack a good
way to associate a DTD or DTD fragment with a prefix, I mean?


Liam Quin, GroveWare Inc., Toronto;  The barefoot agitator
l i a m q u i n     at    i n t e r l o g    dot   c o m

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