[XML-SIG] Is this a bug?

Martin v. Loewis martin@v.loewis.de
Fri, 26 Oct 2001 20:40:32 +0200


> According to my understanding of the manual, I should be able to get the
> value of the attribute in the following way:
> 
> (Pdb) p node.getAttribute(u'linkend')
> ''

> 
> What does work is the following:
> 
> (Pdb) node.getAttributeNS(None, u'linkend')
> u'Class:Scientific.BSP.ParValue'
> 
> Isn't that a bug? 

I have never verified this against the DOM spec, but the common theory
is that this is not a bug in PyXML; if anything, it is a bug in the
DOM.

In short, you are not supposed to mix namespace and non-namespace
calls. If you build the tree through a parser that reports namespaces,
you can only find the attributes through the namespace API.

HTH,
Martin