The Grammar and Parameter Entities

This little paragraph is awfully important. Parameter entities (PEs) are things that show up in the DTD as references beginning with % and ending with ;. They are kind of hideous and hard to use, and especially, they are hard to read when you're looking at someone else's DTD. But for the moment, they are really the only way we have to build DTDs in a modular and maintainable way.

The problem in the spec is that the grammar has to try describe both where PE references can appear, and what the document has to look like after they're expanded. A validating XML processor has to expand PEs (according to a whole bunch of rules provided later in the spec); in this case, the grammar describes what the text looks like after they have all been expanded.

This attempt to do two things at once leads to some awkwardnesses in the grammar, and to the existence of paragraphs such the one this note is attached to.

Back-link to spec

Copyright © 1998, Tim Bray. All rights reserved.