External DTD Grammar

John Cowan cowan at locke.ccil.org
Tue Aug 4 20:41:36 BST 1998

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 at 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)

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