Next Up Previous Contents
Next: 3.3.2 Referring to files
Up: 3.3 Defining entities
Previous: 3.3 Defining entities
[ID index][Keyword index]

3.3.1 Referring to text

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:

<!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>
When the document is parsed, the text for the entity urlroot is substituted for the entity reference &urlroot;.


Next Up Previous Contents
Next: 3.3.2 Referring to files
Up: 3.3 Defining entities
Previous: 3.3 Defining entities
[ID index][Keyword index]
The Starlink SGML Set
Starlink System Note 70
Norman Gray, Mark Taylor
21 April 1999. Release DR-0.7-13. Last updated 24 August 2001