- From: Bjoern Hoehrmann <derhoermi@gmx.net>
- Date: Tue, 12 Mar 2002 17:25:23 +0100
- To: "Jelks Cabaniss" <jelks@jelks.nu>
- Cc: <html-tidy@w3.org>
* Jelks Cabaniss wrote: >Matthew Stanfield wrote: > >> Please ignore my earlier email, someone has just told me I >> need to define all entities in an xml document apart from: >> & ' > < " [&, ', >, <, "]. > >Yes. I see this is becoming a FAQ here too, so ... > >-------------------------------------------------------------- > >Q. Why doesn't (or ©, or &Whatever;) work in XML? > >A. They *will* work if and only if you've referenced a DTD that >declares them for you, such as the XHTML 1.0 Strict DTD at > > http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd This is exactly the reason, why Tidy puts out only numeric character references when the document type declaration is ommited. I think this is a little buggy at the moment, but in general it should work in latest builds. >or you have declared them yourself, as in ... > > <?xml version="1.0"?> > <!DOCTYPE doc [ > <!ENTITY nbsp " "> > <!ENTITY copy "©"> > <!ENTITY alef "א"> > ]> > <doc> > <p>A non-breaking space is invisible, > but if you could see it, it would look > like this: .</p> > > <p>The first letter of the Hebrew > alphabet is &alef;.</p> > > <p>This FAQ © 2002 by XML > Anonymous</p> > </doc> ... You may also import the entities from XHTML 1.0 like <!DOCTYPE html [ <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent"> %HTMLlat1; <!ENTITY % HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent"> %HTMLsymbol; <!ENTITY % HTMLspecial PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent"> %HTMLspecial; ]> -- Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de 25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/
Received on Tuesday, 12 March 2002 11:26:42 UTC