Re: Another issue

The same issue should affect NamedNodeMap.setNamedNode which has consistent
wording on the criteria for throwing INUSE_ATTRIBUTE_ERR.  At least in
Xerces-J, the implementation of Element.setAttributeNode is a delegation to
the implementation of NamedNodeMap.setNamedNode, so any changes should be
consistent.

Removing the node from its original location and not throwing an
INUSE_ATTRIBUTE_ERR would potentially break applications that depended on
this behavior.

If I remember the genesis of this test correctly, there was a processor that
was failing the miswritten elementinuseattribute test which would indicate
that there was a processor that was not throwing an exception.  However, I
would need to survey the implementations again to confirm that.

The cost of implementing the no exception on same behavior is trivial since
it would only add an identity check after it is determined that the
attribute is in use.  I think it is remote that any application would be
adversely affected by changing the implementations to no exception on same
behavior, and if they did, they were at risk for depending on behavior that
was not in the spec.

Received on Tuesday, 29 January 2002 10:58:05 UTC