RE: Resolving Entities

Michael Goldberg wrote:

> Ô 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 ™ 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
 , 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 UTC