note
steves
<p>
Regarding XML and entities, someone may benefit from some
knowledge I picked up:
<ul>
<li>There is no need to declare numeric entities in order
for them to parse okay with most (or maybe all) XML parsers.
i.e., only named entities need to be declared. XML, of
course, has three named entities pre-defined since they're
so core: &amp;, &lt;, and &gt;.</li>
<li>You can pull in all standard HTML entities by using this
sort of <b>DOCTYPE</b> declaration:
<code>
<!DOCTYPE doc [
<!ENTITY % HTMLlat1 PUBLIC
"-//W3C//ENTITIES Latin 1 for XHTML//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
%HTMLlat1;
<!ENTITY % HTMLspecial PUBLIC
"-//W3C//ENTITIES Special for XHTML//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
%HTMLspecial;
<!ENTITY % HTMLsymbol PUBLIC
"-//W3C//ENTITIES Symbols for XHTML//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
%HTMLsymbol;
]>
</code>
</li>
</ul>
</p><p>
I've found the above knowledge useful since so much of the
XML I create is for the purpose of transmitting web based
content, which includes HTML entities.
</p>
417802
417802