DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=27963>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27963 setAttribute duplicates an attribute with an empty value instead of replacing it ------- Additional Comments From [EMAIL PROTECTED] 2004-03-26 15:37 ------- On repoducing this behaviour: This must be cause because of the binary search in the NamedNodeMapImpl. The findNamePoint() in NamedNodeMapImpl performs a binary search based on the name of the node returned by getNodeName(), which returns the namespace prefix and the local name. However, it seems that the attributes in an element are ordered according to the local name. E.g. the serialisation of the element that caused this bug is: <el1 attr1="8.0" uri1:attr2="!8.0" attr2="2.0" attr3="!2" attr4="" xmlns:uri1="uri1"> When I try to set the value of "attr4", the binary search seems to stop after seeing the "uri1:attr2" attribute because 'u' > 'a' and therefore it adds the a new attribute with the same name. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
