Re: C.4 Undeclared entities?

The existence of an "induced" DTD when one is not provided has been
a source of much lively discussion, on the WG, the ERB, and between
XML's co-editors.  There are two questions that are material in the context
of non-provided DTD's:

1. Is there in fact an induced DTD which can be said to control or
   even affect the behavior of an XML processor?
2. Does such an induced DTD serve a useful didactic purpose in explaining
   the behavior of an XML processor.?

The answer to #1 is clearly "no".  Charles provided an example that
exactly matched <!element doc (p,p)>, but unless there have been some huge
advances in tree simplification theory that I haven't heard about, 
deriving the minimal DTD [for any useful definition of minimal] for most
nontrivial real-world documents proves in practice to be horribly difficult
and not all that useful.  Obviously, a DTD that declares all elements to
be ANY and all attributes to be CDATA fills the bill, but it's hard to see
how that controls or even affects the behavior of an XML processor.

#2 is more arguable, but to a person who is still learning what a DTD
is and means, the didactic value is probably negative; to a person who
does understand, it's easier to explain well-formedness with assertions
such as "There is a root element.  Tags balance.  EMPTYs are declared."

The reason why this debate is worth having is practical: should the XML
spec contain any discussion of induced DTD's, yes or no?  I think not.

Cheers, Tim Bray
tbray@textuality.com http://www.textuality.com/ +1-604-488-1167