[XML-SIG] 4DOM: getAttributeNS vs getAttribute

Alexandre Fayolle alf@logilab.com
Tue, 19 Sep 2000 17:29:14 +0200 (CEST)

When I create a DOM document using Sax2.FromXml, all attributes are
created in an empty namespace using setAttributeNS. Since 4DOM maintains 2
dictionnaries (one for namespaceless attributes using the attribute name
as a key, and one for the namespaced attributes using (uri,atributename)),
this means that I cannot retrieve my attributes using getAttribute, even
if no namespace was specified in the XML text (am I clear?).

I somehow feel that a setAttributeNS'ed attribute should be accessible
with getAttribute if the namespace was empty, but this is not specified in
the DOM2 spec. What the spec says is that getAttribute retrieves attribute
by name, so I do not see why it should not find an attribute that has no

Alexandre Fayolle
http://www.logilab.com - "Mais oł est donc Ornicar ?" - 
LOGILAB, Paris (France).