Re: External DTD Grammar

John Cowan (cowan@locke.ccil.org)
Tue, 04 Aug 1998 14:41:07 -0400


Chris Hubick wrote:

> <!ENTITY % endecls '<!ENTITY'>
> %endecls; % example 'test'>
>
> This is not well formed, right? (please say yes)

Unfortunately, it appears to be WF, because clause 4.3.2 says that
every internal PE is WF by definition, and a markup declaration is not one
of the things mentioned in that clause that cannot begin in one
entity and end in another. If endecls were an external entity,
the text would not be WF.

> How do other parsers deal with this? A PEReference preprocessor? A
> preprocessor is hard, because what your preprocessing depends on the
> results of the actual processing that would occur after the preprocessor
> finished.

Why so?

-- 
John Cowan	http://www.ccil.org/~cowan		cowan@ccil.org
	You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
	You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
		Clear all so!  'Tis a Jute.... (Finnegans Wake 16.5)