W3C home > Mailing lists > Public > www-dom@w3.org > July to September 1998

Re: Anybody for a server-DOM spec -> transferring nodes and listener model.

From: Claude Zervas <claude@utlco.com>
Date: Mon, 17 Aug 1998 20:56:39 -0700
Message-Id: <3.0.3.32.19980817205639.009228c0@mail.blarg.net>
To: Ray Whitmer <ray@imall.com>, www-dom@w3.org
>> It is impossible to implement Node.append/insertChild() etc. without
>> casting the Node argument to a known implementation. Otherwise,
>> how would you set the parent and next/previousSibling attributes
>> of the new child?  Casting is slow (in Java) and it assumes a homogeneous
>> implementation.
>
>It is a simple virtual function.  The implementation supplies the
>functionality, and the base class provides the API -- no expensive upcasting
>involved at all.  OO languages would be in big trouble if you had to upcast
>every time you wanted to implement this type of a function.

Hmmm, according to the latest spec Node.next/previousSibling are read-only.
How do you set these without casting to an implementation that has
set methods for these attributes if there are none in the interface ?

I think maybe you thought there was Node.setNext/PreviousSibling()
methods defined somewhere. This, as I understand, was a typo in the old spec.
If not, then the latest spec isn't quite fully cooked.

- Claude
Received on Monday, 17 August 1998 23:47:39 GMT

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