Element setAttributeNS should have qualifiedname parameter.

The method createAttributeNS in Document interface is declared as:
public Attr               createAttributeNS(String namespaceURI,
                                                            String
qualifiedName)
                                                            throws DOMException;

However, the method setAttributeNS in Element interface is defined as:
public void               setAttributeNS(String namespaceURI,
                                                         String localName,
                                                         String value)
                                                         throws DOMException;

Notice that in setAttribute the 2nd parameter is localName and in
createAttribute
the 2nd parameter is qualifiedName.

Now, since the method setAttributeNS is defined to add an attribute if it
doesn't exist,
the typical code calls createAttributeNS in that case. However, in doing so
we lose information, namely the prefix.

I believe that the setAttributeNS call should have qualifiedName as input
parameter as in:
public void               setAttributeNS(String namespaceURI,
                                                         String qualifiedName,
                                                         String value)
                                                         throws DOMException;


___________________________________
Ralf I Pfeiffer
Java Technology Center, Silicon Valley
XML Technology Group
Internet email: rpfeiffe@us.ibm.com
Lotus Notes: Ralf Pfeiffer/Cupertino/IBM
408-777-5814
___________________________________

Received on Wednesday, 29 September 1999 02:58:18 UTC