W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2001

Re: Type-safe iteration over the DOM in DOM 2 & 3?

From: Uche Ogbuji <uche.ogbuji@fourthought.com>
Date: Wed, 21 Mar 2001 21:26:20 -0700
Message-Id: <200103220426.VAA01669@localhost.localdomain>
To: "Joseph Kesselman" <keshlam@us.ibm.com>
cc: www-dom@w3c.org
> 
> >I am sure it has been considered by the W3C
> >to add the ability to use a visitor pattern
> 
> Yes, we did consider the Visitor pattern. It didn't seem to fit the use
> cases we were considering at the time.

I agree with this decision based on experience.  4DOM implements a visitor 
pattern which predates DOM Level 2.  I have many times observed that 
NodeIterator and TreeWalker are much more natural idioms for DOM processing 
than our GoF-based visitors.

Too bad the liveness requirement makes performance such a problem, but that's 
a different story...



-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python
Received on Wednesday, 21 March 2001 23:27:04 GMT

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