000831-2

How can you, using XML, specify a list of abbreviations, and then use these abbreviations instead of the longer text, which they are replacement for?

Answer

Use entities. Define, for example:

<!ENTITY KTH "Kungliga Tekniska Högskolan">

And then use the following

<DESCRIPTION>&KTH; is a technical university.</DESCRIPTION>

which is identical to

<DESCRIPTION>Kungliga Tekniska Högskolan is a technical university.</DESCRIPTION>

List of exam questions