[XML-SIG] DOM Considered Harmful :-)
Greg Stein
gstein@lyra.org
Tue, 04 May 1999 13:08:28 -0700
Crap. Hit Reply rather than Reply All... :-)
Greg Stein wrote:
>
> Sean Mc Grath wrote:
> >
> > [Greg Stein]
> > >
> > >2) the close() method and parent/sibling relationships
> > >
> > >Adding parent/sibling relationships introduces loops unless you use
> > >proxies or introduce a close() method (if there is another way, then I'd
> > >like to learn it).
> >
> > In LumberJack, a collection of nodes (LJNode objects) are
> > associated with a tree object known as an LJTree. When the
> > reference count of an LJTree shrinks to zero LumberJack
> > walks the associated, doubly linked LJnodes and
> > breaks the double links:-
>
> How could the tree ever hit a refcount of zero? If the tree refers to
> the Nodes and the Nodes to the tree, then you have a reference loop.
>
> Or are you maintaining a global list of Node references? (and filtering
> for those that refer to the tree) Oh. That wouldn't work, since that
> presumes the Nodes are still referencing the tree, which is not possible
> (since the tree has zero refs in this case)
>
> Regardless, while you may have solved the loops problem, this is a
> rather complex solution. I had stated in my original note that close()
> caused one of two problems: loops or complexity. Its sounds like you're
> hiding some of the complexity from users, but it is still there. I'd
> like to believe that we can provide XML parsing/consumption without the
> complexity.
>
> Cheers,
> -g
>
> --
> Greg Stein, http://www.lyra.org/
--
Greg Stein, http://www.lyra.org/