W3C home > Mailing lists > Public > www-dom@w3.org > April to June 1998

[Fwd: Core spec: Element and Node]

From: (wrong string) é <wdonne@ibm.net>
Date: Tue, 21 Apr 1998 12:05:02 +0200
Message-ID: <353C6F4E.25CA@ibm.net>
To: www-dom@w3.org
I have the impression my earlier submission failed. Sorry if you get it
twice anyway.
-- 
Werner Donné
Re BVBA
Leuvenselaan 172
B-3300 Tienen
tel: (+32) 16 810203
fax: (+32) 16 820826
E-mail: wdonne@ibm.net

attached mail follows:


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 Tuesday, 21 April 1998 06:03:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:45 GMT