[lxml-dev] Default prefixes for common XML namespaces *sometimes* doesn't work

Hi, in 2.0alpha5 the feature was added that there are defaults for some namespace prefixes (like xsi, xsd, py). Problem is, I sometimes still get things like <attribute xmlns:ns0="http://codespeak.net/lxml/objectify/pytype" ns0:pytype="str">bla</attribute> And I don't know why. What are the conditions when LXML uses (in this case) the py: prefix and when not? Or is it a bug? In the case above I used an ObjectPath with setattr. Regards, -- Christian Zagrodnick gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891

Hi, Christian Zagrodnick wrote:
in 2.0alpha5 the feature was added that there are defaults for some namespace prefixes (like xsi, xsd, py).
-py here.
Problem is, I sometimes still get things like
<attribute xmlns:ns0="http://codespeak.net/lxml/objectify/pytype" ns0:pytype="str">bla</attribute>
And I don't know why. What are the conditions when LXML uses (in this case) the py: prefix and when not? Or is it a bug?
Just wasn't in the dict of default prefixes. I added it. Stefan

On 2008-02-22 07:58:17 +0100, Stefan Behnel <stefan_ml@behnel.de> said:
Hi,
Christian Zagrodnick wrote:
in 2.0alpha5 the feature was added that there are defaults for some namespace prefixes (like xsi, xsd, py).
-py here.
Problem is, I sometimes still get things like
<attribute xmlns:ns0="http://codespeak.net/lxml/objectify/pytype" ns0:pytype="str">bla</attribute>
And I don't know why. What are the conditions when LXML uses (in this case) the py: prefix and when not? Or is it a bug?
Just wasn't in the dict of default prefixes. I added it.
Oh. So I must have seen ghosts... sorry :) But thanks for adding! -- Christian Zagrodnick gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
participants (2)
-
Christian Zagrodnick
-
Stefan Behnel