Originally posted by Raseswari Achanta:
<?xml version="1.0"?>
<!DOCTYPE DOCUMENT[
<!ELEMENT DOCUMENT (Head,Body)>
<!ENTITY % PCD "(#PCDATA)">
<!ELEMENT Head %PCD;>
<!ELEMENT Body %PCD;>
]>
<Document>
<Head>
Title goes here
</Head>
<Body>
This is the document.
</Body>
</Document>
Unfortunately, you can't do that. If you look at the XML 1.0 specification, it's illegal to use a parameter entity as a PART of a markup declaration in the internal subset. This was to simplify the job of people who write non-validating parsers. If you moved your declarations into an external subset and referenced it using the SYSTEM keyword of the <!DOCTYPE> declaration it would work fine. There are a few strange little quirks like that in XML.
------------------
W. Scott Means author,
Strategic XML smeans@strategicxml.com