<html>
<head>
<title>Predefined Entities</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="Description">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
<tr>
<td valign="top" class="NAME">Predefined Entities</td>
<td valign="top" class="COMPATIBILITY">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td valign="top" colspan="2" class="description">

<p>Besides
user-defined entity references, XML includes the five named
entity
references shown in <link linkend="xmlnut3-CHP-21-TABLE-1">Table 21-1</link> that can be used
without being declared. These references are a subset of those
available in HTML documents.</p>

<table id="xmlnut3-CHP-21-TABLE-1" label="21-1">

<p class="TITLE">Predefined entities</p>




<thead>
<tr valign="top">
<td>
<p>Entity</p>
</td>
<td>
<p>Character</p>
</td>
<td>
<p>XML declaration</p>
</td>
</tr>
</thead>
<tbody>
<tr valign="top">
<td>
<p><span class="LITERAL">&amp;lt;</span></p>
</td>
<td>
<p>&lt;</p>
</td>
<td>
<p><span class="LITERAL">&lt;!ENTITY lt</span>
"<span class="LITERAL">&amp;#38;#60;"&gt;</span></p>
</td>
</tr>
<tr valign="top">
<td>
<p><span class="LITERAL">&amp;gt;</span></p>
</td>
<td>
<p>&gt;</p>
</td>
<td>
<p><span class="LITERAL">&lt;!ENTITY gt "&amp;#62;"&gt;</span></p>
</td>
</tr>
<tr valign="top">
<td>
<p><span class="LITERAL">&amp;amp;</span></p>
</td>
<td>
<p>&amp;</p>
</td>
<td>
<p><span class="LITERAL">&lt;!ENTITY amp</span>
"<span class="LITERAL">&amp;#38;#38;"&gt;</span></p>
</td>
</tr>
<tr valign="top">
<td>
<p><span class="LITERAL">&amp;apos;</span></p>
</td>
<td>
<p>'</p>
</td>
<td>
<p><span class="LITERAL">&lt;!ENTITY apos "&amp;#39;"&gt;</span></p>
</td>
</tr>
<tr valign="top">
<td>
<p><span class="LITERAL">&amp;quot;</span></p>
</td>
<td>
<p>"</p>
</td>
<td>
<p><span class="LITERAL">&lt;!ENTITY quot "&amp;#34;"&gt;</span></p>
</td>
</tr>
</tbody>

</table>

<p>The <span class="LITERAL">&amp;lt;</span> and <span class="LITERAL">&amp;amp;</span>
entities must be used wherever <span class="LITERAL">&lt;</span> or
<span class="LITERAL">&amp;</span> appear in element content or attribute
values. The <span class="LITERAL">&amp;gt;</span> entity is frequently used
wherever <span class="LITERAL">&gt;</span> appears in document content, but it
is only mandatory to avoid putting the sequence
<span class="LITERAL">]]&gt;</span> into content. <span class="LITERAL">&amp;apos;</span>
and <span class="LITERAL">&amp;quot;</span> are generally used only within
attribute values to avoid conflicts between the value and the quotes
used to contain the value.</p>

<p>Although the parser must recognize these entities regardless of
whether they have been declared, you can declare them in your DTD
without generating errors.</p>

<p>The presence of these "special"
predefined entities creates a conundrum within an XML document.
Because it is possible to use these references without declaring
them, it is possible to have a valid XML document that includes
references to entities that were never declared. The XML
specification actually encourages document authors to declare these
entities to support older SGML parsers that don't
predefine these entities. In practical terms, declaring these
entities only adds unnecessary complexity to your document.</p>
</td></tr>
</table>
</div>
</body>
</html>