W3C home > Mailing lists > Public > www-dom-ts@w3.org > January 2002

Re: Another issue

From: Philippe Le Hegaret <plh@w3.org>
Date: Wed, 30 Jan 2002 14:20:16 -0500
Message-ID: <3C584770.9F55EEC7@w3.org>
To: Curt Arnold <carnold@houston.rr.com>
Cc: www-dom-ts@w3.org

Dimitris raised the issue at the DOM teleconference an hour.

The current wording in the specification is clear regarding throwing
an exception or not.

INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of
another Element object. The DOM user must explicitly clone Attr nodes
to re-use them in other elements.

You can replace an Attribute node with itself with setAttributeNode, therefore
the failure of the Xerces implementation on the test is appropriate.

On the other hand, it is not clear if this operation is considered as
a "no-op" one or should behave like a normal setAttributeNode operation, i.e. fire 
the appropriate events, etc. With no objection, it was decided to not
consider it as a normal operation, therefore replacing an Attribute node with
itself is a no-op operation and "does nothing".

The same decision should be applied to setNamedItemNS.

Errata will follow soon.

Received on Wednesday, 30 January 2002 14:40:16 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:04 UTC