You can make an entity a shorthand for a piece of text which might either need to be parameterised, or which it is simply inconvenient to repeatedly retype.
For example:
When the document is parsed, the text for the entity<!DOCTYPE sun PUBLIC "-//Starlink//DTD Starlink SUN//EN" [ <!ENTITY urlroot "http://www.astro.gla.ac.uk/users/norman"> ]> [...] <p>Here is a <webref url="&urlroot;/star/" >web page</webref>
urlroot
is substituted for the entity reference
&urlroot;
.