[Cialug] How many people are using Python ?

Colin Burnett cmlburnett at gmail.com
Tue Dec 30 12:51:55 CST 2008


On Tue, Dec 30, 2008 at 12:42 PM, Zachary Kotlarek <zach at kotlarek.com> wrote:
>
> That's because XML doesn't define a character entity for mdash. While HTML
> defines 252 named character entities in XML you only get five predefined
> entities:
>        quot
>        amp
>        apos
>        lt
>        gt
>
> If you want to use any other character entity it must be explicitly declared
> in the DTD; generally I find it easier just to use the numeric character
> reference.

It's not a parsing issue.  Use the XHTML strict DOCTYPE and it parses
just fine.  It literally eats them and puts nothing in the DOM.
"foo&mdash;foo" becomes "foofoo".


Colin


More information about the Cialug mailing list