Lists Home |
Date Index |
- From: Rick JELLIFFE <firstname.lastname@example.org>
- To: email@example.com
- Date: Tue, 08 Aug 2000 17:16:29 +0800
"Paul W. Abrahams" wrote:
> There is, to be sure, a way around this. The DTD can prefix every name with an
> entity reference, and the calling document can declare that entity reference to
> have as its value the correct prefix, effectively parameterizing the DTD. But
> this is a kludge - an ugly, awkward kludge that I don't think anyone is defending
> as an adequate solution.
Parameter entities are there to parameterize the DTD. It is not kludgy
to use them for that purpose.
But in this specific case, I don't really understand how using PEs
allows redefinition of names. Doesn't XML 1.0 preclude that?
4.4.8 Included as PE
Just as with external parsed entities, parameter entities need only be
if validating. When a parameter-entity reference is recognized in the
included, its replacement text is enlarged by the attachment of one
one following space (#x20) character; the intent is to constrain the
text of parameter entities to contain an integral number of grammatical
The reason for this rule is to simulate the effect of SGML's Entity End
signal: this is a signal in the parsed document that an entity has
ended. People who followed the C Preprocessor's evolution would remember
that some early cpp versions allowed token construction after
replacement: this was regarded as unsafe and obscure and so they ended
up creating a specific operator (##) to indicate text replacement with
no spacing (this is from memory, I am sure others have better grasp on
the facts here).
I know the DTD for XML Schemas use it, but I have never bothered to
check up on why. Now that I look at it, I am a little confused.