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

Re: Older Sibling?

From: David Brownell <david-b@pacbell.net>
Date: Mon, 28 Feb 2000 16:25:16 -0800
Message-ID: <38BB11EC.9E38756D@pacbell.net>
To: John Cowan <jcowan@reutershealth.com>
Cc: "www-dom@w3.org" <www-dom@w3.org>
John Cowan wrote:
> 
> David Brownell wrote:
> 
> > Perhaps.  If you got used to using it, the linked list implementation
> > would accumulate some bizarre costs since it'd need to recompute that
> > property pretty often ... but that'd be more reasonable than asking for
> > a specific "is this child before that one" primitive, as you'd seemed
> > to be suggesting!
> 
> Furthermore, if the element is part of an entity, then no single index
> will work, as the element node may be in the tree in multiple places.

Actually I tend to disagree on that one.

There is some nasty text in the DOM spec saying that the "same" nodes
are EntityRef children as are children of the respective Entity.  Is
that what you're thinking about?

But that notion of "same" seems to me like it must be (equals? a b)
rather than (eq? a b), to sneak in two LISP primitives ... since, unlike
the case with LISP, DOM nodes have (non-null) ancestors that prevent
them from being in more than one place at a time.  A DOM is a tree,
not a general graph.

(Note to DOM WG:  Perhaps the prose on that part of the DOM spec needs
to say what it means by "same"?)

- Dave
Received on Monday, 28 February 2000 19:25:35 GMT

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