python & xml question

Martin v. Loewis martin at
Sun Aug 4 10:12:50 CEST 2002

"jano" <jnana4 at> writes:

> The declaration is in the external DTD subset.

Ok. For pyexpat, this is then as good as if it wasn't present at all -
pyexpat does not (normally) read the external subset.

Of course, if you provide an entity resolver, it will.

> I used — because the XML is destined to be HTML, and #151, as
> far as i know, is the only representation that works in all
> browsers.

I somehow doubt that - in particular since that does *not* mean mdash
in HTML.

Indeed, I could not find a browser where &8212; would not work.

> The &#151 I was using not because of my operating system's encoding, but
> because I was foolishly encoding special characters in the way that I
> thought they would ultimately end up in a browser.

I'm actually quite surprised that it works in so many browsers. That
probably comes from all the Windows users that don't understand HTML,
so that the other browsers had to support this "Microsoft extension".


More information about the Python-list mailing list