- From: (wrong string) é <wdonne@ibm.net>
- Date: Mon, 20 Apr 1998 16:20:47 +0200
- To: DOM <www-dom@w3.org>
Hi, Element: I think the operations Element.getAttribute, Element.removeAttribute and Element.removeAttributeNode should throw the NoSuchAttributeException. The reasons are the following: getAttribute: the return type is wstring. There is no value in the domain of wstring that is good choice to indicate that there is no such value. We are BTW attempting to ask for an attribute of an object that potentially does not exist. Asking for the object itself should not throw an exception because we must be able to test if some object is part of the set. removeAttribute: Attribute is a Node. The behavior of the operation should thus be consistent with Node.removeChild. removeAttributeNode: the same reason. Calling the Node.removeChild operations has the same effect. It is just less type specific. Node: In my opinion Node should have the operation "destroy". Else it impossible to ever get rid of a node once it is created. There is no notion of connectedness nor reference counting between object reference and object in CORBA. This means an object must be logically kept alive until someone says otherwise explicitely. The destroy operation should not be allowed to work on nodes that are still contained. Another option is to have Node.removeChild and Node.replaceChild return nothing and add the destroy semantics to them. This leaves us with the root element which is normally a document. The DOM interface should have a destroyDocument operation to solve the problem. Adding destroy to Node is simpler. Regards, -- Werner Donné Re BVBA Leuvenselaan 172 B-3300 Tienen tel: (+32) 16 810203 fax: (+32) 16 820826 E-mail: wdonne@ibm.net
Received on Monday, 20 April 1998 10:19:12 UTC