[XML-SIG] xmlns='' and DOM regression?

Sylvain Thenault Sylvain.Thenault@logilab.fr
Wed, 12 Dec 2001 17:10:54 +0100 (CET)


On Wed, 12 Dec 2001, St=E9phane Bidoul wrote:

> Hi!
>=20
> It seems to me that the latest commits to=20
> dom/ext/reader/sax2.py introduced a slight regression=20
> in the handling of xmlns=3D''.
>=20
> Here's the script:
>=20
> import xml.dom.ext.reader.Sax2
> xmls =3D "<test xmlns=3D''>data</test>"
> doc =3D xml.dom.ext.reader.Sax2.FromXml(xmls)
>=20
> And the stack trace
>
[snip]=20
>=20
> After a quick look at the code I'd suggest the following patch
> (but the real problem may be elsewhere).

I think the problem is right there. Each DOM reader in python should
handle correctly empty namespaces and empty prefix which equals None
(EMPTY_NAMESPACE and EMPTY_PREFIX, defined in xml.dom.__init__).

It'll take a litle time to correct all the actual code which use None
_and_ empty string, but it 'll be so easier after that ;)

--=20
Sylvain Thenault

  LOGILAB           http://www.logilab.org