Amara: Where's my attribute?

AdSR artur_spruce at
Thu Jun 29 10:41:18 CEST 2006


I'm having a problem with the Amara toolkit. Try this:

>>> from amara import binderytools
>>> raw = '<pq:test xmlns="" xmlns:pq=""/>'
>>> rwd = binderytools.bind_string(raw)
>>> print rwd.xml()
<?xml version="1.0" encoding="UTF-8"?>
<pq:test xmlns:pq=""/>

What happened to the xmlns attribute? Does anyone know a solution to
this? The only workaround I found is to:

>>> rwd.test.xml_set_attribute(u'xmlns', u'')
>>> print rwd.xml()
<?xml version="1.0" encoding="UTF-8"?>
<pq:test xmlns:pq=""

but it only helps if you know what to patch.

My setup:

Python 2.4.3
4Suite 1.0b3
Amara 1.0

I see that people have reported similar problems with other XML
toolkits, so I guess this is a general namespace ugliness.



More information about the Python-list mailing list