Creating Internal Parameter Entities

As we've seen, you use general entity references in documents so that the XML processor will replace them with the entity to which they refer. However, you can use general entities only in a limited way in DTDs— that is, you can use them to insert text that will itself be inserted into the document content, but you can't use them to work with the declarations themselves in the DTD.

To actually work with element and attribute declarations, you use parameter entities. Parameter entity references can be used in only the DTD. In fact, there's an additional restriction: Any parameter entity references that you use in any DTD declaration must appear only in the DTD's external subset (the external subset is that ...

Get Inside XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.