[Lazarus] DTD ENTITY question
Adem
listmember at letterboxes.org
Mon May 31 10:16:42 CEST 2010
On 2010-05-30 23:39, Sergei Gorelkin wrote:
> Adem wrote:
>> I am writing a general parser for DTD files and have made some headway.
>>
> The FCL xml parser (xmlread unit) can parse XML-conformant DTD files
> for several years already.
I should've said a general SGML parser --not just a subset of it (XML)
>> I need to know the general (canonical?) name for '*%HTMLlat1*;' at
>> the end of the following line:
>>
>> <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin1//EN//HTML"
>> "HTMLlat1.ent">*%HTMLlat1*;
>>
>> I don't seem to be able to find in documents/examples on the Net.
>>
>> Does anyone know what such things are called?
>>
> I'm not sure I understood your question correctly. Such constructs are
> called "parameter entities", very similar to an include file.
Yes, it is a parameter entity declaration; an there's probably hundreds
of such declarations in any DTD file worth its salt.
But, this is more than an ordinary parameter entity declaration.
I mean, a usual parameter entity definition would be as follows:
<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin1//EN//HTML"
"HTMLlat1.ent">
but this one has a '%HTMLlat1;' attached to it after the close-tag.
Obviously, it is referring to the definition just made. Fine.
But, what do we call such a construct?
What is the general name for the adding stuff after the parameter
definition?
> The tag <!ENTITY % name PUBLIC "foo" "bar"> declares the entity, and
> %name; is used to actually include it.
IOW, the example above has already defined '%HTMLlat1;' so what is the
point in adding (seemingly superfluous) '%HTMLlat1;' *after* the definition?
OK. I am not really asking why; all I want to know is what would the
general name for such things?
--
Cheers,
Adem
More information about the Lazarus
mailing list