W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2001

RE: Resolving Entities

From: Jelks Cabaniss <jelks@jelks.nu>
Date: Fri, 19 Jan 2001 16:00:15 -0500
To: <html-tidy@w3.org>
Message-ID: <NBBBICMNIPCICMKJECCBIENBEBAA.jelks@jelks.nu>
Michael Goldberg wrote:

> &#212; entity reference.  I thought it was supposed to be the trademark
> symbol (superscript TM).

No -- see

	http://www.jelks.nu/XML/ASCIIchart.html

and look at decimal 212..

> However, the following code: ...
> Prints the following output:
> 		Name: #textValue: **

As it should.  Try &#8482; instead for the trademark symbol.

How do you find this out?  You look at an [x]HTML DTD:

  For HTML 4.01:

     http://www.w3.org/TR/html4/strict.dtd
     http://www.w3.org/TR/html4/loose.dtd

  For XHTML 1.0:

     http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
     http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

In each of these DTDs, there are references to 3 entity files -- for
Symbols, Latin1, and "Special".  These are the places where things like
&nbsp;, etc. are defined.  So for example, taking a glance at the XHTML 1.0
Strict DTD, you'll see in "xhtml-symbol.ent" (referenced in the two XHTML
DTDs above) this:

    <!ENTITY trade "&#8482;">
    <!-- trade mark sign, U+2122 ISOnum -->


/Jelks
Received on Friday, 19 January 2001 16:02:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:45 GMT