W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

Re: Walking the DOM (was: XML APIs)

From: Don Park <donpark@quake.net>
Date: Tue, 3 Nov 1998 19:29:26 -0800
Message-ID: <01b501be07a3$54911310$2ee044c6@arcot-main>
To: <www-dom@w3.org>
Stephen,

>THANK YOU!  THANK YOU!  THANK YOU!
>I was beginning to think I was the only one with this opinion.


Many in the WG feels the same as you do so don't lose hope yet.  Patience,
however, is definitely needed.

>firstChild and parentNode, too.


I think firstChild and parentNode can be retained as a absolute view of the
document.  All we need is a sort of 'view' interface to use as the context:

Node parentNode = crazyView.getParentNode(aNode);
Node firstChild = crazyView.getFirstChild(parentNode);

>I would like to see iterators with something like the following interface:
[snip]

Please don't go overboard.  What you are describing is not an iterator but a
rather distasteful but strangely sensible combination of
Iterator/View/Cursor patterns.

A cleaner way to do this is to use something like this:

public interface NodeModel {
    Object getParentNode (Object node);
    ...
    NodeIterator createIterator (Object node);
    NodeView createView (Object context);
    ...
}

Document views can be easily support with this design like this:

public interface NodeView extends NodeModel {
    ...
}

We are too late to do this though...

Best,

Don Park
Docuverse
Received on Tuesday, 3 November 1998 22:30:29 GMT

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